KaskoazulState of the Art - Daily supply distribution historic series
    Updated 2022-03-06
    WITH LIQUID AS (
    SELECT
    date as fecha,
    sum(balance) as liquid
    FROM
    terra.daily_balances
    WHERE
    currency ='LUNA'
    AND balance_type = 'liquid'
    AND balance > 0
    GROUP BY 1
    ),

    STAKE AS (
    SELECT
    date as fecha,
    sum(balance) as staked
    FROM
    terra.daily_balances
    WHERE
    currency ='LUNA'
    AND balance_type = 'staked'
    AND balance > 0
    GROUP BY 1
    )

    SELECT
    l.fecha,
    sum(l.liquid),
    sum(s.staked)
    FROM LIQUID l
    INNER JOIN stake s
    ON l.fecha = s.fecha

    Run a query to Download Data