historical-futures-data-sample / examples /query_with_duckdb.sql
lynx1231's picture
Upload folder using huggingface_hub
29efdfa verified
Raw
History Blame Contribute Delete
358 Bytes
-- Run from the package root with DuckDB.
SELECT
contract_symbol,
MIN(timestamp_chicago_wall) AS first_bar,
MAX(timestamp_chicago_wall) AS last_bar,
COUNT(*) AS observations,
SUM(volume) AS reported_volume
FROM read_parquet('data/minute/*/*/*.parquet', hive_partitioning = false, filename = true)
GROUP BY contract_symbol
ORDER BY contract_symbol;