Command line interface

Run SQL directly on CSV or TSV files  ↦

q is a command line tool that allows direct execution of SQL-like queries on CSVs/TSVs (and any other tabular text files). q treats ordinary files as database tables, and supports all SQL constructs, such as WHERE, GROUP BY, JOINs etc. It supports automatic column name and column type detection, and provides full support for multiple encodings.

An example of using q to count distinct values of a specific field (uuid of clicks data)

q -H -t "SELECT COUNT(DISTINCT(uuid)) FROM ./clicks.csv"


Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00