superflyUntitled Query
    Updated 2022-10-27
    with pool_tb as (
    select
    date_trunc('day', block_timestamp) as date,
    FROM_CURRENCY,
    TO_CURRENCY,
    tx_id,
    b.value::string as poolID
    from osmosis.core.fact_swaps, lateral flatten(input => pool_ids) b
    )
    ,lst_tb as (
    select poolID,
    count(DISTINCT tx_id) as tx_count
    from pool_tb
    where poolID is not null
    group by 1
    order by 2 desc
    limit 10
    )

    select
    date(block_timestamp) as date,
    'Pool_Id:' || b.value::string as poolIds,
    count(DISTINCT tx_id) as tx_counts,
    sum(tx_counts) over (partition by poolIds order by date asc) as cum_growth_tx_counts
    from osmosis.core.fact_swaps, lateral flatten(input => pool_ids) b
    where b.value::string in ( select poolID from lst_tb)
    and b.value::string is not null
    and date >= '2022-07-27'
    group by 1,2
    Run a query to Download Data