banbannard$OP Airdrop 2
    Updated 2022-09-28
    with base as (select
    origin_from_address as claimers,
    min(block_timestamp) as claim_date
    from optimism.core.fact_token_transfers
    where from_address ilike '0xFeDFAF1A10335448b7FA0268F56D2B44DBD357de'
    and contract_address = '0x4200000000000000000000000000000000000042'
    and origin_function_signature ilike '0x2e7ba6ef'
    group by 1
    order by 1 desc),

    base2 as (select
    distinct(origin_from_address) as buyers
    from optimism.core.fact_token_transfers a
    join base b
    on b.claimers = origin_from_address
    where contract_address = '0x4200000000000000000000000000000000000042'
    and from_address <> claimers
    and to_address = claimers
    and block_timestamp > claim_date
    group by 1
    ),
    base3 as (select
    distinct(origin_from_address) as sellers
    from optimism.core.fact_token_transfers a
    join base b
    on b.claimers = origin_from_address
    where contract_address = '0x4200000000000000000000000000000000000042'
    and from_address = claimers
    and to_address <> claimers
    and block_timestamp > claim_date
    group by 1
    ),

    base4 as (select *, 1 as numbering, 'Bought More OP' as action from base2 where buyers not in (select * from base3)
    union
    Run a query to Download Data