Skip to main content

q

q executes SQL-like queries on CSV and TSV files.

I use this all the time for running quick ad-hoc queries on data that is a bit too large to deal with in a spreadsheet.

Example call:

q -H -d "," "SELECT COUNT(*) FROM ./raw.csv WHERE created>'2020-05-22 23:00:00';"

-H skips the header row. -d specifies the delimiter.