ML614oposmo
    Updated 2023-02-08
    with top_tokens as (select sum(TO_AMOUNT/1e6) , PROJECT_NAME from osmosis.core.fact_swaps inner join osmosis.core.dim_tokens
    on address=FROM_CURRENCY
    where TO_CURRENCY='uosmo' and block_timestamp::date>= current_date - 30 and PROJECT_NAME!='OSMO'
    group by 2
    order by 1 DESC
    limit 10)
    , top_tokens_overtime as (select sum(TO_AMOUNT/1e6) , PROJECT_NAME , block_timestamp::date from osmosis.core.fact_swaps inner join osmosis.core.dim_tokens
    on address=FROM_CURRENCY
    where TO_CURRENCY='uosmo' and block_timestamp::date>= current_date - 30 and PROJECT_NAME!='OSMO' and PROJECT_NAME in(select PROJECT_NAME from top_tokens)
    group by 2,3)
    select * from top_tokens_overtime

    Run a query to Download Data