adriaparcerisasAvalanche transfers vs l2 4
    Updated 2024-09-17
    WITH
    tpb1 as (
    select
    block_number,
    block_timestamp,
    count(distinct tx_hash) as txs
    from avalanche.core.ez_token_transfers
    where block_timestamp>='2022-01-01' and contract_address=lower('0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e')
    group by 1,2
    ),
    avax as (
    SELECT
    trunc(block_timestamp,'month') as date,
    avg(txs) as avg_tx_per_block
    from tpb1
    group by 1
    order by 1 asc
    ),
    tpb2 as (
    select
    block_number,
    block_timestamp,
    count(distinct tx_hash) as txs
    from optimism.core.ez_token_transfers
    where block_timestamp>='2022-01-01' and contract_address=lower('0x7F5c764cBc14f9669B88837ca1490cCa17c31607')
    group by 1,2
    ),
    opt as (
    SELECT
    trunc(block_timestamp,'month') as date,
    avg(txs) as avg_tx_per_block
    from tpb2
    group by 1
    order by 1 asc
    ),
    tpb3 as (
    QueryRunArchived: QueryRun has been archived