superflyDistribution of Actions Volume By Join Type
    Updated 2022-11-28
    with pricet as (
    select recorded_at::date as day,
    address,
    symbol,
    avg (price) as USDPrice
    from osmosis.core.dim_prices t1 join osmosis.core.dim_labels t2 on t1.symbol = t2.project_name
    where symbol != 'IOV'
    group by 1,2,3),

    SingleSideT as (
    select tx_id,
    count (tx_id) as TXS_Count
    from osmosis.core.fact_liquidity_provider_actions
    where action = 'pool_joined'
    and tx_status = 'SUCCEEDED'
    group by 1
    having TXS_Count < 2),

    BothAssetsT as (
    select tx_id,
    count (tx_id) as TXS_Count
    from osmosis.core.fact_liquidity_provider_actions
    where action = 'pool_joined'
    and tx_status = 'SUCCEEDED'
    group by 1
    having TXS_Count > 1)
    select 'Carefully Wade In (Single Side)' as join_type,
    case when amount*usdprice/pow(10,decimal) < 10 then 'Less Than $10'
    when amount*usdprice/pow(10,decimal) >= 10 and amount*usdprice/pow(10,decimal) < 100 then '$10 - $100'
    when amount*usdprice/pow(10,decimal) >= 100 and amount*usdprice/pow(10,decimal) < 1000 then '$100 - $1000'
    when amount*usdprice/pow(10,decimal) >= 1000 and amount*usdprice/pow(10,decimal) < 10000 then '$1000 - $10000'
    else 'More Than $10000' end as type,
    count (distinct tx_id) as TX_Count
    from osmosis.core.fact_liquidity_provider_actions t1 join pricet t2 on t1.block_timestamp::date = t2.day and t1.currency = t2.address
    where tx_status = 'SUCCEEDED'
    Run a query to Download Data