hut,
@hut@chaos.social avatar

Did you know you can run queries on CSV files directly? 😍

https://til.simonwillison.net/sqlite/one-line-csv-operations

$ 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.3

Or in one line:
$ sqlite3 :memory: -cmd '.mode csv' -cmd '.import thermometer.csv therm' 'SELECT ...'

  • @cnx@larkspur.one avatar
    cnx
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • mdbf
  • osvaldo12
  • Youngstown
  • slotface
  • InstantRegret
  • thenastyranch
  • cubers
  • kavyap
  • everett
  • DreamBathrooms
  • ethstaker
  • magazineikmin
  • megavids
  • khanakhh
  • tacticalgear
  • love
  • Durango
  • modclub
  • GTA5RPClips
  • cisconetworking
  • normalnudes
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines