Query editor
with t as (select app_data, usd_value from cow_protocol_ethereum.tradeswhere block_time > now() - interval '90' day),j as (select t.usd_value, t.app_data, a.app_hash, a.app_code, a.widget_app_codefrom t left join cow_protocol_ethereum.app_data a on t.app_data = a.app_hash)selectcasewhen app_data = 0x0000000000000000000000000000000000000000000000000000000000000000 then '1_zero_hash'when app_hash is null then '2_nonzero_unresolved'when app_code is null then '3_resolved_but_no_appcode'when widget_app_code is not null then '4_has_appcode_AND_widget_marker'else '5_has_appcode_no_widget_marker' end as bucket,count(*) as trades, sum(usd_value) as volume_usdfrom j group by 1 order by 1