tongzzeznew user stake
    Updated 2022-12-07
    with minnn as (
    select

    LIQUIDITY_PROVIDER_ADDRESS as users,
    min(case when currency like 'ibc%' then date_trunc('hour',block_timestamp) end) as min_axl,
    min(case when currency like 'uosmo%' then date_trunc('hour',block_timestamp) end) as min_osmo

    from
    osmosis.core.fact_liquidity_provider_actions
    where
    action like 'pool_joined'
    and pool_id like '812'
    and TX_STATUS = 'SUCCEEDED'
    group by users
    )

    select
    ifnull(min_osmo, min_axl) as hours,
    count(case when min_axl is not null then 1 end) as privide_axl,
    count(case when min_osmo is not null then 1 end) as provide_osmo
    from minnn
    group by hours
    Run a query to Download Data