campLUNA Distribution Mvmt 1: The Basics
    Updated 2022-02-09
    with HBALANCE_USD as (
    Select
    SUM(BALANCE_USD) AS HBALANCE_USD
    from terra.daily_balances
    where currency='LUNA' AND BALANCE_TYPE='liquid'
    GROUP BY ADDRESS
    ORDER BY SUM(BALANCE_USD) desc
    LIMIT 100
    )

    Select
    (select sum(HBALANCE_USD) from HBALANCE_USD) AS HBALANCE_USD
    ,SUM(BALANCE_USD) as Total_SUM
    ,((select sum(HBALANCE_USD) from HBALANCE_USD)/SUM(BALANCE_USD))*100 AS Percent
    from terra.daily_balances
    where currency='LUNA' AND BALANCE_TYPE='liquid'
    Run a query to Download Data