Updated 2023-01-03
    ---credit to jackguy
    with tab1 as (
    SELECT
    tx_from,
    min(BLOCK_TIMESTAMP) as min_time
    FROM osmosis.core.fact_transactions
    GROUP by 1
    )
    SELECT
    date_trunc('day', min_time) as day,
    action_type,
    count(*)
    FROM (
    SELECT
    min_time,
    'swap' as action_type
    FROM osmosis.core.fact_swaps
    LEFT OUTER JOIN tab1
    ON trader = tx_from
    AND min_time = BLOCK_TIMESTAMP
    WHERE NOT tx_from is NULL

    UNION

    SELECT
    min_time,
    'staking' as action_type
    FROM osmosis.core.fact_staking
    LEFT OUTER JOIN tab1
    ON TX_CALLER_ADDRESS = tx_from
    AND min_time = BLOCK_TIMESTAMP
    WHERE NOT tx_from is NULL
    UNION
    SELECT
    min_time,
    'liquidity provider actions' as action_type
    Run a query to Download Data