Query editor
-- Bitcoin Runes + Taproot dailyWITH daily_runes AS (SELECTblock_date AS date,COUNT(DISTINCT tx_id) AS runes_txFROM bitcoin.outputsWHERE block_date >= date('{{start_date}}')AND block_date < date('{{end_date}}')AND type = 'nulldata'AND bytearray_starts_with(script_hex, 0x6a5d)AND block_height >= 840000GROUP BY 1),daily_total AS (SELECT block_date AS date, COUNT(*) AS total_txFROM bitcoin.transactionsWHERE block_date >= date('{{start_date}}') AND block_date < date('{{end_date}}') AND is_coinbase = falseGROUP BY 1),daily_taproot AS (SELECT block_date AS date,COUNT(DISTINCT CASE WHEN type = 'witness_v1_taproot' THEN tx_id END) AS taproot_input_txFROM bitcoin.inputsWHERE block_date >= date('{{start_date}}') AND block_date < date('{{end_date}}')GROUP BY 1)SELECT t.date, t.total_tx,COALESCE(r.runes_tx, 0) AS runes_tx,COALESCE(tp.taproot_input_tx, 0) AS taproot_tx,ROUND(100.0 * COALESCE(r.runes_tx, 0) / NULLIF(t.total_tx, 0), 2) AS runes_pct,ROUND(100.0 * COALESCE(tp.taproot_input_tx, 0) / NULLIF(t.total_tx, 0), 2) AS taproot_input_pctFROM daily_total tLEFT JOIN daily_runes r ON t.date = r.dateLEFT JOIN daily_taproot tp ON t.date = tp.dateORDER BY t.date ASC