LTirrell2022-02-18_terra_circulating-supply
    Updated 2022-03-11
    -- Question 151: Display the circulating supply of LUNA over the past 3 months. Use on-chain data for your calculation, but you are welcome to reference outside sources to support and validate your answer.
    select
    date,
    sum(balance) as total_balance
    from
    terra.daily_balances
    where
    date >= '2021-11-22' and date < CURRENT_DATE
    and currency = 'LUNA'
    and balance > 0
    and balance_type = 'liquid'
    and (
    ADDRESS_LABEL is NULL
    or ADDRESS_LABEL != 'terraform'
    )
    and (
    ADDRESS_NAME is NULL
    or ADDRESS_NAME != 'terra mint/burns swap fees'
    )
    and (
    ADDRESS_LABEL_SUBTYPE is NULL
    or ADDRESS_LABEL_SUBTYPE != 'staking'
    )
    group by
    date
    order by
    date
    Run a query to Download Data