select
block_timestamp,
tx_id,
case when swap_from_mint = 'hAYtTeaJLUZBvtS9ZpnrKjcLHUA44FgEyAAnMtP3EfB' then 'Sell'
when swap_to_mint = 'hAYtTeaJLUZBvtS9ZpnrKjcLHUA44FgEyAAnMtP3EfB' then 'Buy'
end as status,
case when swap_from_amount_usd is null then swap_to_amount_usd else swap_from_amount_usd end as Volume_USD
from solana.defi.ez_dex_swaps
where (swap_from_mint = 'hAYtTeaJLUZBvtS9ZpnrKjcLHUA44FgEyAAnMtP3EfB' or swap_to_mint = 'hAYtTeaJLUZBvtS9ZpnrKjcLHUA44FgEyAAnMtP3EfB')
and block_timestamp >= '2025-02-25 16:03:21.000'
and block_timestamp <= '2025-02-25 16:03:42.000'
-- group by 1,2
order by block_timestamp asc