hbd1994Amount of LDO Bought
    Updated 2022-06-02
    with holder as (select distinct "Top Unique Holder", max("Amount of LDO Holds") as "Amount of LDO Holds"
    from(select distinct user_address as "Top Unique Holder", balance as "Amount of LDO Holds"
    from flipside_prod_db.ethereum.erc20_balances
    where CONTRACT_ADDRESS = '0x5a98fcbea516cf06857215779fd812ca3bef1b32'
    and balance_date = CURRENT_DATE
    group by 1,2
    order by 2 desc
    )
    group by 1
    order by 2 desc
    limit 50)

    select distinct event_inputs:to as "LDO Buyer", sum(event_inputs:value/1e18) as "Amount of LDO Bought"
    FROM flipside_prod_db.ethereum_core.fact_event_logs
    inner join holder on holder."Top Unique Holder"=fact_event_logs.event_inputs:to
    where contract_address = '0x5a98fcbea516cf06857215779fd812ca3bef1b32'
    and event_name = 'Transfer'
    and EVENT_INPUTS:from != '0x4b3edb22952fb4a70140e39fb1add05a6b49622b'
    group by 1
    order by 2 desc

    Run a query to Download Data