articoloquintoPercentage of COSG holder who minted
    Updated 2022-07-09
    select 'COSG holders' as "type", count(*) as "minters" from(
    select distinct RECEIVER as "holders"
    FROM flipside_prod_db.algorand.transfers
    where ASSET_SENDER = 'MS7TKJ3MXE6CQ5IZW2ZQC2KT3NWJFQPRSDAFTZPGYPFCZZ43PL7UPBTZXE'
    and AMOUNT > 0
    and ASSET_ID != '0' --ALGO
    and ASSET_ID != '798595086' --WL TOKEN
    and ASSET_ID != '571576867' --COSG
    ) as m
    inner join(
    select * from(
    select sum("amount") as "amount", "address" from(
    select sum(AMOUNT) as "amount", RECEIVER as "address"
    from flipside_prod_db.algorand.transfers
    where ASSET_ID = '571576867'
    group by 2
    union
    select -sum(AMOUNT) as "amount", ASSET_SENDER as "address"
    from flipside_prod_db.algorand.transfers
    where ASSET_ID = '571576867'
    group by 2)
    group by 2)
    where "amount" > 0) as h
    on m."holders" = h."address"
    union
    select 'non-COSG holders' as "type", 207-count(*) as "minters" from(
    select distinct RECEIVER as "holders"
    FROM flipside_prod_db.algorand.transfers
    where ASSET_SENDER = 'MS7TKJ3MXE6CQ5IZW2ZQC2KT3NWJFQPRSDAFTZPGYPFCZZ43PL7UPBTZXE'
    and AMOUNT > 0
    and ASSET_ID != '0' --ALGO
    and ASSET_ID != '798595086' --WL TOKEN
    and ASSET_ID != '571576867' --COSG
    ) as m
    inner join(
    Run a query to Download Data