SELECT date_trunc('month',block_timestamp) as date,
case when pool_ids[0]=1 then 'ATOM/OSMO'
when pool_ids[0]=498 then 'ATOM/JUNO'
when pool_ids[0]=497 then 'JUNO/OSMO'
when pool_ids[0]=560 then 'USTC/OSMO'
when pool_ids[0]=463 then 'NGM/OSMO'
end as pool_id,
COUNT(DISTINCT TRADER) as users
FROM osmosis.core.fact_swaps
where pool_id is not null
GROUP BY 1,2