with first_t as (
SELECT
MIN(BLOCK_TIMESTAMP) as first_date,
tx_from
FROM osmosis.core.fact_transactions
GROUP by 2
)
SELECT
MONTH(first_date) as months,
PROJECT_NAME,
count(*) as txs
FROM osmosis.core.fact_swaps
LEFT OUTER JOIN first_t ON trader = tx_from AND first_date = BLOCK_TIMESTAMP
LEFT outer JOIN osmosis.core.dim_tokens ON to_currency = address
WHERE NOT tx_from is NULL AND first_date::date >= '2022-01-01'
GROUP BY 1, 2