Query editor
with side_volume as (selectdate_trunc('day', block_time) as day,casewhen token_bought_address = 0x6050d829f5a5e0ea758d8357ddcdec1381699248 then 'Buy'when token_sold_address = 0x6050d829f5a5e0ea758d8357ddcdec1381699248 then 'Sell'end as side,amount_usdfrom dex.tradeswhere blockchain = 'bnb'and (token_bought_address = 0x6050d829f5a5e0ea758d8357ddcdec1381699248or token_sold_address = 0x6050d829f5a5e0ea758d8357ddcdec1381699248)and block_time >= now() - interval '30' day)selectday,side,sum(amount_usd) as volume_usdfrom side_volumewhere side is not nullgroup by 1, 2order by 1, 2