Query editor
select day, case when inventory < 100_000 then 'Others'when token is null or token = '' then 'Others'else token end as token,SUM(inventory) as inventoryfrom (select day, case when token in ('USDT', 'USDC', 'DAI', 'BUSD', 'USDbC', 'USDP') then 'Stables' else token end as token, SUM(balance_usd) as inventory from (-- MAINNETselect day, blockchain, balance_usd, token_symbol as tokenfrom tokens_ethereum.balances_dailywhere day > cast('2023-08-15' as timestamp) and balance_usd > 100_000and address in (0x51C72848c68a965f66FA7a88855F9f7784502a7F,0x77d5f03822f94B39ad6117F6a46761EC5879031b--0x0000006daea1723962647b7e189d311d757Fb793,--0x00000000AE347930bD1E7B0F35588b92280f9e75,--0xAF0B0000f0210D0f421F0009C72406703B50506B,--0x6BE36e53242A2224942826afa2D24960419f84Ee)) as bgroup by 1, 2) as agggroup by 1, 2 order by 2 desc