SQL on a CSV file using sqlite

Using sqlite’s in memory database to load a .csv called taxi.csv

sqlite3 :memory: -cmd '.mode csv' -cmd '.import taxi.csv taxi' \
  'SELECT passenger_count, COUNT(*), AVG(total_amount) FROM taxi GROUP BY passenger_count'


This was found for doing some work to benchmark dsq - a tool for querying against a multitude of format types (JSON, CSV, Excel, Parquet, etc.) -