Query editor
with token_list as (select * from (values(0x76bb1eb4ff2172fc925c2013f674bb58342dff22, 'gMESSI'),(0x192ed0be3fc868916390b864791afe280bcaf7f6, 'gBRUN'),(0xd85f684f1e1c6edd97f8214bfec577a9f65165d1, 'gMONK'),(0x20668e4542df7d840f47970954f9398e4e01d5c7, 'gPULI'),(0xa0dd634a9d3c91829081fc66b90103a3e5c6aeec, 'gSPEED'),(0xbf88ed85e8fd528d6370be619fd43206fa28c9de, 'gSHAI'),(0x865d7ad904804155f5ecb399efd2cbe6af47801b, 'gOHTANI'),(0xee8b7b02fe52597d53f0cb45c625df7acff2ccce, 'gMBAPPE'),(0x5b0314865b880108b9cd1ef1bc7b8075effc9012, 'gBRADY'),(0xcedf028059b39bbabd340a62fc993abe2a36e5db, 'gCADE'),(0xd87a8e8c6d0ef4460581f5e5f5829381023ff7a8, 'gYAMAL'),(0x65af283cd126a007741c8a6683c2fdadcc82d9f3, 'gWEMBY'),(0x570d8a9effa39a6aa6c58eaed019c6724c9d4772, 'gKOBE'),(0xe91253175be290132911153c4e0b76b5573f7610, 'gMJ'),(0xd5185a8329161567fee26646feaad56f360b146d, 'gCHAR'),(0x143bdb8ebb0b6b5c5c3da4528175095dd2e254c7, 'gBRON'),(0x44174816ab56987fe5788cddf4065261673c2551, 'gPIKA'),(0x179a81c325f27044ebbf3aeae9ddcbcbc9d578e0, 'gRONALDO'),(0x1433dc30d043a513dfa77f344f72040231469ef7, 'gDOUE')) as t(contract_address, symbol)),token_supply as (selecttl.contract_address,sum(casewhen tr."from" = 0x0000000000000000000000000000000000000000then cast(tr.value as double) / 1e18when tr."to" = 0x0000000000000000000000000000000000000000then -(cast(tr.value as double) / 1e18)else 0end) as circulating_supplyfrom token_list tlleft join erc20_base.evt_transfer tron tl.contract_address = tr.contract_addressgroup by tl.contract_address),all_trades as (selecttoken_bought_address as contract_address,amount_usd / token_bought_amount as price_usd,amount_usd,block_time,taker as traderfrom dex.tradeswhere blockchain = 'base'and token_bought_address in (select contract_address from token_list)and amount_usd > 0and token_bought_amount > 0union allselecttoken_sold_address as contract_address,