hut, Did you know you can run #SQLite queries on CSV files directly? 😍
https://til.simonwillison.net/sqlite/one-line-csv-operations #cli #sql
$ sqlite3 :memory:
sqlite> .mode csv
sqlite> .import thermometer.csv therm
sqlite> .schema
CREATE TABLE therm(
"date" TEXT,
"time" TEXT,
"temperature" TEXT
);
sqlite> SELECT date, MAX(temperature) FROM therm GROUP BY date;
2022-06-19, 35.4
2022-06-20, 42.8
2022-06-21, 49.3Or in one line:
$ sqlite3 :memory: -cmd '.mode csv' -cmd '.import thermometer.csv therm' 'SELECT ...'