Query editor
{{unnamed_parameter}}SELECTcasewhen input_mint > output_mint then COALESCE(tk_in.symbol, substring(input_mint,1,5)) || '-' || COALESCE(tk_out.symbol, substring(output_mint,1,5))else COALESCE(tk_out.symbol, substring(output_mint,1,5)) || '-' || COALESCE(tk_in.symbol, substring(input_mint,1,5))end as pair, count(*) as swaps, count(distinct account_user) as traders, sum(case when call_block_time >= try_cast ('{{on}}' AS Timestamp) then COALESCE(in_amount_usd,out_amount_usd) else null end) as Date_1, sum(case when call_block_time >= try_cast ('{{2nd}}' AS Timestamp) then COALESCE(in_amount_usd,out_amount_usd) else null end) as Date_2, sum(case when call_block_time >= now() - interval '24' hour then COALESCE(in_amount_usd,out_amount_usd) else null end) as volume_24_hour, sum(case when call_block_time >= now() - interval '7' day then COALESCE(in_amount_usd,out_amount_usd) else null end) as volume_7_dayFROM dune.dune.result_jupiter_dca_fill_volume_mat spLEFT JOIN tokens_solana.fungible tk_in ON tk_in.token_mint_address = sp.input_mintLEFT JOIN tokens_solana.fungible tk_out ON tk_out.token_mint_address = sp.output_mintgroup by 1order by 4 desc