Query editor
-- Infrastructure Sector: LayerZero-- Using layerzero.messages table (canonical) — ts_source for timestamp, actual fee columnsWITH lz_daily AS (SELECTCAST(ts_source AS date) AS block_date,'LayerZero' AS protocol,COUNT(*) AS message_count,SUM(COALESCE(usd_value, 0)) AS transfer_volume_usd,SUM(COALESCE(usd_dvn_fee, 0) + COALESCE(usd_executor_fee, 0)) AS actual_fees_usd,COUNT(DISTINCT addr_from) AS active_users,COUNT(DISTINCT source_chain) AS source_chains_active,COUNT(DISTINCT destination_chain) AS dest_chains_activeFROM layerzero.messagesWHERE ts_source >= CURRENT_TIMESTAMP - INTERVAL '90' DAYGROUP BY 1)SELECTblock_date,protocol,transfer_volume_usd AS volume_usd,actual_fees_usd AS estimated_fees_usd,active_users,message_count,source_chains_active,dest_chains_active,SUM(transfer_volume_usd) OVER (ORDER BY block_date) AS cumulative_volume,SUM(actual_fees_usd) OVER (ORDER BY block_date) AS cumulative_feesFROM lz_dailyORDER BY block_date DESC