select symbol_out,
symbol_in,
sum (coalesce (amount_out_usd,amount_in_usd)) as USD_Volume,
count (distinct tx_hash) as Swaps,
count (distinct origin_from_address) as Traders
from avalanche.defi.ez_dex_swaps
where (token_out in ('0x420fca0121dc28039145009570975747295f2329' -- COQ
,'0x184ff13b3ebcb25be44e860163a5d8391dd568c1' -- KIMBO
,'0x5ac04b69bde6f67c0bd5d6ba6fd5d816548b066a' -- TECH
,'0xe8385cecb013561b69beb63ff59f4d10734881f3' -- GEC
,'0xacfb898cff266e53278cc0124fc2c7c94c8cb9a5' -- NOCHILL
)
or token_out ilike '{{Memecoin_Contract_Address}}')
and block_Timestamp >= current_date - {{Last_X_Days}}
group by 1,2 having usd_volume > 0
order by 1,USD_Volume desc
limit 1000