CryptoIcicleWallet Balances & Ecosystem Growth - Ratio
    Updated 2022-10-26
    -- Wallet Balances & Ecosystem Growth
    -- With the launch of Flipside's new Balances table, let's take a look at how the story of Osmosis can be told through wallet balances. Provide insights into following metrics:
    -- Grand Prize 63.026 OSMO
    -- Payout 42.017 OSMO
    -- Payout Network Osmosis
    -- Level Intermediate
    -- Difficulty Hard

    -- With the launch of Flipside's new Balances table, let's take a look at how the story of Osmosis can be told through wallet balances.
    -- Provide insights into following metrics:
    -- How has the ratio of liquid to staked OSMO changed overtime?
    -- Are the top 100 OSMO holders the same now as they were at the start of the year?
    -- What is the current average OSMO per wallet? How has that value changed over time? Plot average OSMO/wallet against user growth.
    -- Do wallets normally hold a majority of OSMO, or another token? How has this changed over time?
    -- BONUS: Post your dashboard on Twitter and tag @flipsidecrypto and any relevant accounts!
    select
    date,
    balance_type as type,
    sum(balance/1e6) as amount,
    avg(balance/1e6) as avg_balance,
    count(distinct address) as n_wallets,
    avg(avg_balance) over (partition by type order by date asc rows between unbounded preceding and current row) as cum_avg_balance
    from osmosis.core.fact_daily_balances
    where balance_type in ('staked','liquid')
    and currency = 'uosmo'
    and date >= '{{start_date}}'
    group by 1,2
    order by date desc,type
    Run a query to Download Data