Delamir-6014OSMO01 Total amount
    Updated 2022-11-28
    with single as (
    select
    tx_id,
    pool_id,
    count (tx_id) as TXs_1
    from osmosis.core.fact_liquidity_provider_actions
    where action = 'pool_joined'
    and TX_STATUS = 'SUCCEEDED'
    group by 1,2
    having count (tx_id)<2
    )
    , pair as (
    select
    tx_id,
    pool_id,
    count (tx_id) as TXs_2
    from osmosis.core.fact_liquidity_provider_actions
    where action = 'pool_joined'
    and TX_STATUS = 'SUCCEEDED'
    group by 1,2
    having count (tx_id)>=2
    )
    , Price as (
    select
    date(RECORDED_AT) as date,
    avg(price) as Price,
    address,
    symbol
    from osmosis.core.dim_prices a
    join osmosis.core.dim_labels b on a.symbol = b.PROJECT_NAME
    group by 1,3,4
    )

    select
    'single_Side' as Joining,
    sum(amount / pow(10,decimal)) as Total_amount,
    Run a query to Download Data