Query editor
-- Exact-token drill-down for accrued Tycho router revenue and separate client-- fees. Exact uint256 atomics are authoritative; decimal-adjusted units are a-- human display only. Zero-fee periods remain explicit in the call-spined-- summary and intentionally have no token row here.WITH atomic_source AS (SELECTperiod_start,data_chain AS chain,attribution_scope AS fee_category,token_address,token_symbol,atomic_value_exact,observed_row_count AS fee_recipient_entries,release_statusFROM "query_7970737(chain='{{chain}}',timeframe='{{timeframe}}',end_date_mode='through_current_day',start_date='2025-01-01 00:00:00',end_date='2100-01-01 00:00:00')"WHERE metric_family = 'tycho_fee_atomic'AND metric_name IN ('propellerheads_accrued_revenue_atomic','client_integrator_fee_atomic')),release_gate AS (SELECT COUNT_IF(COALESCE(release_status, 'fail') <> 'pass') AS failing_rowsFROM atomic_source),physical_rows AS (SELECTCASEWHEN '{{timeframe}}' = 'monthly' THEN date_trunc('month', f.block_time)WHEN '{{timeframe}}' = 'weekly' THEN date_trunc('week', f.block_time)ELSE date_trunc('day', f.block_time)END AS period_start,f.chain,f.fee_category,f.pricing_token AS token_address,f.tx_hash,f.recipient,f.fee_token_symbol,f.fee_token_decimals,f.block_timeFROM dune.propeller_heads.result_tycho_fee_recipient_fact_v3_live fWHERE f.block_time >= TIMESTAMP '2025-01-01 00:00:00'AND f.block_time < CAST(date_add('day', 1,CAST(at_timezone(CURRENT_TIMESTAMP, 'UTC') AS DATE)) AS TIMESTAMP)AND ('{{chain}}' = 'all' OR f.chain = '{{chain}}')AND f.fee_category IN ('router_revenue', 'client_integrator_fee')),event_counts AS (SELECTperiod_start,chain,fee_category,