Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/--get UTXO volume and coin days destroyedSELECTdate_trunc('{{granularity}}', block_time) time, sum(value) as total_volume--could use bitcoin.transactions and sum(input_value) instead., sum(value * EXTRACT(DAY FROM (now() - b.time))) as coin_days_destroyedFROM bitcoin.inputs iLEFT JOIN bitcoin.blocks b ON i.spent_block_height = b.heightGROUP BY 1