Skip to content

Instantly share code, notes, and snippets.

@leostera
Created December 7, 2025 20:49
Show Gist options
  • Select an option

  • Save leostera/dbbde9bb2e0dbbe1b5b7f1016c14fb58 to your computer and use it in GitHub Desktop.

Select an option

Save leostera/dbbde9bb2e0dbbe1b5b7f1016c14fb58 to your computer and use it in GitHub Desktop.
Query Solana transaction data with DuckDB
import duckdb
duckdb.sql("""
SELECT DATE_TRUNC('hour', block_timestamp) AS hour,
COUNT(*) AS tx_count,
SUM(fee) / 1e9 AS total_fees_sol
FROM '2025-11-01/*.parquet'
GROUP BY hour
ORDER BY hour
""").show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment