import duckdb from "duckdb"; const db = new duckdb.Database("./options.duckdb"); const filename = "/home/brian/Downloads/options-data/2013-01-02options.cvs"; db.run(`CREATE TABLE prices AS SELECT * FROM read_csv_auto('${filename}')`, (err) => { if (err) { throw err; } db.all("SELECT count(*) AS count FROM prices WHERE underlying = 'TSLA'", function(err2, res) { if (err2) { throw err2; } console.log(res[0].count); }); });