keshantop addresses Sum
    Updated 2022-01-24
    --Select date_trunc('day', date) as day, sum(balance), address_label_type, address_label_subtype from terra.daily_balances where currency = 'LUNA' group by day, address_label_type, address_label_subtype
    --SELECT * from terra.daily_balances where address_label_type = 'chadmin' and currency = 'LUNA'
    select sum(holding) from
    (SELECT DISTINCT address, address_label_type, address_label_subtype, address_name,
    sum(balance) as holding FROM terra.daily_balances
    where BALANCE_TYPE = 'liquid'
    and CURRENCY = 'LUNA'
    and address_label_subtype != 'mints_burns'
    and address_label_subtype != 'mint_burn'
    --and address_label_type != 'dex'
    and address_label_subtype != 'staking'
    and address_label_subtype != 'staking_contract'
    and address_label_subtype != 'token_vesting'
    --and address_name != 'community pool'
    and date_trunc('day', date) = date_trunc('day', CURRENT_DATE())-1
    group by 1, 2, 3, 4
    order by holding desc
    LIMIT 100)
    Run a query to Download Data