Query editor
-- select project_contract_address-- , sum(amount_usd) as amount_usdselect date_trunc('hour', block_time) as open_time, project_contract_address, sum(case when token_bought_symbol = 'WETH' then token_bought_amount else token_sold_amount end) as weth_gross, sum(case when token_bought_symbol = 'WETH' then token_sold_amount else token_bought_amount end) as usdc_gross, sum(case when token_bought_symbol = 'WETH' then -token_bought_amount else token_sold_amount end) as weth_net -- sign = effect on pool balances, sum(case when token_bought_symbol = 'WETH' then token_sold_amount else -token_bought_amount end) as usdc_net, sum(amount_usd) as amount_usd_grossfrom dex.tradeswhere blockchain = 'base'and project_contract_address in( 0x97a3ece859d9c1c41e225fbd6f10359dae7a73c9, 0x250f0df8fbd0d749e4aadc05d91c5d8f9053d437, 0x2C0Ea123a2C7E2175f8204a8Ff2a37187eED24Ff)-- and block_time < date '2024-08-01'group by 1, 2order by 1, 2