MrftiLiquid to staked OSMO
    Updated 2022-10-22
    WITH
    stake AS
    (
    select sum (balance/pow(10,6)) as staked_osmo,
    date_trunc (day, date) as day
    from osmosis.core.fact_daily_balances
    where balance_type='staked'
    group by day
    order by day asc),
    liquid as
    (
    select sum (balance/pow(10,6)) as liquid_osmo,
    date_trunc (day, date) as day
    from osmosis.core.fact_daily_balances
    where balance_type='liquid'
    group by day
    order by day asc)

    SELECT day,
    staked_osmo,
    liquid_osmo,
    liquid_osmo/staked_osmo as ratio_of_liquid_to_staked
    from stake join liquid using (DAY)
    GROUP by 1,2,3,4
    order by day asc


    Run a query to Download Data