Query editor
-- ============================================================-- Solana - Daily Revenue + Token Issuance (Full History)-- PART 1 of 2: Full history using only fast tables-- ============================================================---- SOURCES (all fast, partition-safe):-- solana.blocks (44 GB) → tx counts, block counts-- prices.usd → SOL price---- COLUMNS:-- date → calendar day UTC-- tx_count → successful_transactions (all types)-- non_vote_tx → successful non-vote transactions (true user activity)-- block_count → number of blocks produced-- base_fees_sol/usd → approximated: non_vote_tx × 0.000005 SOL-- (5,000 lamports base fee per tx, 1 sig assumed)-- burned_sol/usd → 50% of base fees burned (per Solana docs)-- Priority fees NOT burned (SIMD-0096)-- validator_base_sol/usd → 50% of base fees to validators-- sol_price_usd → average SOL price for the day---- NOTE: Priority fees and exact total fees require gas_solana.fees-- (13.7TB) — see Part 2 query for last 30 days of exact data.-- NOTE: Token issuance requires solana.rewards (1.3TB) — see Part 2.-- ============================================================WITHdaily_blocks AS (SELECTdate,SUM(total_transactions) AS total_tx,SUM(successful_transactions) AS tx_count,SUM(successful_non_vote_transactions) AS non_vote_tx,COUNT(*) AS block_countFROM solana.blocksWHERE date >= DATE '2022-01-01'AND date < CURRENT_DATEGROUP BY 1),sol_prices AS (SELECTDATE(minute) AS date,AVG(price) AS sol_price_usdFROM prices.usdWHERE symbol = 'SOL'AND blockchain IS NULLAND price > 0AND DATE(minute) >= DATE '2022-01-01'AND DATE(minute) < CURRENT_DATEGROUP BY 1)SELECTb.date,b.tx_count,b.non_vote_tx,b.total_tx,b.block_count,