Query editor
selectCASEWHEN '{{Aggregation}}' = 'Daily' THEN date_trunc('day', block_time)WHEN '{{Aggregation}}' = 'Weekly' THEN date_trunc('week', block_time)WHEN '{{Aggregation}}' = 'Monthly' THEN date_trunc('month', block_time)END AS "date", sum(fee_usd) as fees_usdfrom dex_solana.tradeswhere block_time > cast('2024-01-01' as timestamp) and project = 'whirlpool'group by 1