saber-jltotal eth to op
    Updated 2022-10-02
    WITH A as(
    SELECT
    case
    WHEN BLOCK_NUMBER < 15537393 THEN 'Before Merge'
    WHEN BLOCK_NUMBER >= 15537393 THEN 'After Merge'
    END as Period,
    date_trunc('day',block_timestamp) as date,
    sum(amount) as total_ETH_amount,
    sum(AMOUNT_USD) as transfer_amount_in_$,
    COUNT(DISTINCT ORIGIN_FROM_ADDRESS) as wallet,
    COUNT(DISTINCT tx_hash) as txn
    FROM ethereum.core.ez_eth_transfers
    WHERE ORIGIN_TO_ADDRESS IN ('0x99c9fc46f92e8a1c0dec1b1747d010903e884be1',
    '0x52ec2F3d7C5977A8E558C8D9C6000B615098E8fC')
    AND date >= '2022-09-01'
    group by 1,2
    order by 2 asc
    )
    SELECT
    period,
    sum(transfer_amount_in_$),
    sum(txn),
    sum(wallet),
    sum(total_ETH_amount)
    from A
    group by 1
    Run a query to Download Data