headitmanagertotal distribution of Headline token holders
    Updated 2022-06-16
    with pixel_ids as (select distinct asset_id from algorand.asset where asset_name like '%PIXEL ASTRO #%')
    , astro_ids as (select distinct asset_id from algorand.asset where asset_name like 'Astro #%')
    , pixel_wallets as (select sum(amount),address from algorand.account_asset inner join pixel_ids
    on algorand.account_asset.asset_id=pixel_ids.asset_id
    group by address
    having sum(amount)>0
    order by sum(amount) desc)
    , astro_wallets as (select sum(amount),address from algorand.account_asset inner join astro_ids
    on algorand.account_asset.asset_id=astro_ids.asset_id
    group by address
    having sum(amount)>0
    order by sum(amount) desc)
    , pixel_algo as (select sum(balance),algorand.account.address from algorand.account inner join pixel_wallets
    on algorand.account.address=pixel_wallets.address
    group by algorand.account.address
    having sum(balance)>0
    order by sum(balance) desc)
    , astro_algo as (select sum(balance),algorand.account.address from algorand.account inner join astro_wallets
    on algorand.account.address=astro_wallets.address
    group by algorand.account.address
    having sum(balance)>0
    order by sum(balance) desc)
    ,initial_sale as (select sum(amount)
    from algorand.payment_transaction
    where sender='NIN73GEWDWBU3HHEPGWGIQZMOITN4PU3YVTKMR3ESI7DCH5ME4E5TLB4XU'
    )
    ,initial_sale_overtime as (select sum(amount),block_timestamp::date
    from algorand.payment_transaction
    where sender='NIN73GEWDWBU3HHEPGWGIQZMOITN4PU3YVTKMR3ESI7DCH5ME4E5TLB4XU'
    group by block_timestamp::date)
    ,total_sale as (select sum(amount)
    from algorand.payment_transaction
    where (sender='NIN73GEWDWBU3HHEPGWGIQZMOITN4PU3YVTKMR3ESI7DCH5ME4E5TLB4XU' or receiver='NIN73GEWDWBU3HHEPGWGIQZMOITN4PU3YVTKMR3ESI7DCH5ME4E5TLB4XU')
    )
    Run a query to Download Data