Delamir-6014osm05 Pool 837 since 2022-11-15
    Updated 2022-12-03
    with pool_1 as (
    select
    tx_id,
    pool_id,
    count (tx_id) as TXs_1
    from osmosis.core.fact_liquidity_provider_actions
    where pool_id = '837'
    and block_timestamp::date >= '2022-11-15'
    and action = 'pool_joined'
    and TX_STATUS = 'SUCCEEDED'
    group by 1,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
    block_timestamp::date as datee,
    pool_id as Pool_Number,
    count(distinct a.tx_id) as TXs,
    sum(TXs) over (order by datee) as Cumulative_TXs,
    sum(amount / pow(10,decimal)) as daily_amount,
    sum(daily_amount) over (order by datee) as Cumulative_amount,
    sum(amount * Price / pow(10,decimal)) as daily_amount_USD,
    sum (daily_amount_USD) over (order by datee) as Cumulative_USD
    from osmosis.core.fact_liquidity_provider_actions a
    join price b on a.currency = b.address and a.BLOCK_TIMESTAMP::date = b.date
    where tx_id in (select tx_id from pool_1)
    group by 1,2
    Run a query to Download Data