LordkingUntitled Query
    Updated 2022-11-10
    -- credit austin
    with
    main as (
    select
    ORIGIN_FROM_ADDRESS as claimer ,
    RAW_AMOUNT/pow(10,18) as volume ,
    BLOCK_TIMESTAMP ,
    TX_HASH
    from optimism.core.fact_token_transfers
    where
    ORIGIN_TO_ADDRESS ='0xfedfaf1a10335448b7fa0268f56d2b44dbd357de' and
    CONTRACT_ADDRESS = '0x4200000000000000000000000000000000000042' and
    FROM_ADDRESS ='0xfedfaf1a10335448b7fa0268f56d2b44dbd357de' and
    ORIGIN_FUNCTION_SIGNATURE ='0x2e7ba6ef'
    )
    select
    BLOCK_TIMESTAMP::date as date ,
    count(distinct TX_HASH) as trxs ,
    count(distinct claimer) as claimers ,
    sum(volume) as OP ,
    sum(trxs) over (order by date ) as cum_trxs ,
    sum(claimers) over (order by date ) as cum_claimers ,
    sum(OP) over (order by date ) as cum_OP ,
    250000-cum_claimers as remaining_claimers ,
    214748364-cum_OP as remaining_op

    from main
    group by 1
    Run a query to Download Data