freemartianBudget Distribution Among Shared Users
    Updated 2022-06-17
    with source as ( select distinct eth_from_address as sender, sum(amount) as "bridged Amount"
    from ethereum.core.ez_eth_transfers
    where origin_to_address in (lower('0x52ec2F3d7C5977A8E558C8D9C6000B615098E8fC'), lower('0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1'))
    and sender in (
    select origin_from_address
    from ethereum.core.fact_event_logs
    where origin_to_address = lower('0xb8901acb165ed027e32754e0ffe830802919727f')
    and event_name = 'TransferSentToL2'
    and EVENT_INPUTS:chainId ='10'
    )
    group by sender)

    select count(sender) as count, 'low budget' as label
    from source
    where "bridged Amount" <= 0.1
    UNION
    select count(sender) as count, 'medium budget' as label
    from source
    where "bridged Amount" between 0.1 and 1
    UNION
    select count(sender) as count, 'high budget' as label
    from source
    where "bridged Amount" <= 1

    Run a query to Download Data