Pmisha-bmlMdxinflow LDO
    Updated 2022-06-02
    with t1 as (select
    USER_ADDRESS,
    LABEL,
    LABEL_SUBTYPE,
    LABEL_TYPE,
    BALANCE
    from flipside_prod_db.ethereum.erc20_balances
    WHERE LABEL is null
    and contract_address = lower('0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32')
    and BALANCE_DATE=CURRENT_DATE-3
    order by 5 desc limit 100)


    select
    'From Airdrop' as type,
    TO_ADDRESS as top_holders,
    sum(AMOUNT) as LDO
    from flipside_prod_db.ethereum_core.ez_token_transfers
    where CONTRACT_ADDRESS='0x5a98fcbea516cf06857215779fd812ca3bef1b32'
    and FROM_ADDRESS=lower('0x4b3edb22952fb4a70140e39fb1add05a6b49622b')--airdrop
    and TO_ADDRESS in (select USER_ADDRESS from t1)
    group by 1,2
    union all
    select
    'Bought' as type,
    TO_ADDRESS as top_holders,
    sum(AMOUNT) as LDO
    from flipside_prod_db.ethereum_core.ez_token_transfers
    where CONTRACT_ADDRESS='0x5a98fcbea516cf06857215779fd812ca3bef1b32'
    and FROM_ADDRESS!=lower('0x4b3edb22952fb4a70140e39fb1add05a6b49622b')--bought
    and FROM_ADDRESS!=lower('0xf73a1260d222f447210581DDf212D915c09a3249')--LIDO aragon
    and TO_ADDRESS in (select USER_ADDRESS from t1)
    group by 1,2

    Run a query to Download Data