Query editor
selectdate_trunc('month',block_time) as month,sum(case when token_pair like '%X7101%' then 1 else 0 end) as X7101_count,sum(case when token_pair like '%X7101%' then amount_usd else 0 end) as X7101_amt,sum(case when token_pair like '%X7102%' then 1 else 0 end) as X7102_count,sum(case when token_pair like '%X7102%' then amount_usd else 0 end) as X7102_amt,sum(case when token_pair like '%X7103%' then 1 else 0 end) as X7103_count,sum(case when token_pair like '%X7103%' then amount_usd else 0 end) as X7103_amt,sum(case when token_pair like '%X7104%' then 1 else 0 end) as X7104_count,sum(case when token_pair like '%X7104%' then amount_usd else 0 end) as X7104_amt,sum(case when token_pair like '%X7105%' then 1 else 0 end) as X7105_count,sum(case when token_pair like '%X7105%' then amount_usd else 0 end) as X7105_amt,count(*) as total_swaps,sum(amount_usd) as total_volfrom dex.tradeswhere (token_pair like '%X7101%' ortoken_pair like '%X7102%' ortoken_pair like '%X7103%' ortoken_pair like '%X7104%' ortoken_pair like '%X7105%')and block_date >= timestamp '2022-09-01'and blockchain in (Select blockchain from unnest(split('{{blockchain}}',',')) as c(blockchain))group by date_trunc('month',block_time)