select date_trunc('day', block_timestamp) as date, sum(price_usd) as swaps_volume, count(tx_id) as swaps_count, count(distinct trader) as unique_user
from flow.core.fact_swaps, flow.core.fact_prices
where split_part(token_in_contract , '.', 3) = token
group by 1