yasmin-n-d-r-hswap currency osmo
    Updated 2023-01-02
    with active as (
    select
    min(BLOCK_TIMESTAMP) as Weeks,
    tx_from as Users
    from
    osmosis.core.fact_transactions
    where
    tx_status = 'SUCCEEDED'
    group by
    2
    )
    select
    *
    from
    (
    SELECT
    date_trunc('week', block_timestamp) as week,
    project_name,
    count(DISTINCT trader) as first_users,
    rank() over(
    partition by week
    order by
    first_users desc
    ) as rank
    from
    osmosis.core.fact_swaps
    join osmosis.core.dim_labels on to_currency = address
    where
    trader in (
    select
    users
    from
    active
    )
    GROUP BY
    1,
    Run a query to Download Data