hbd1994Number of Pools
    Updated 2023-11-03
    with base as (
    (select
    'Arbitrum' as network,
    BLOCK_TIMESTAMP,
    TX_HASH,
    DECODED_LOG:fee/10000 as fee,
    DECODED_LOG:pool as pool_address,
    DECODED_LOG:tickSpacing as tickSpacing,
    DECODED_LOG:token0 as token0,
    DECODED_LOG:token1 as token1
    from arbitrum.core.ez_decoded_event_logs
    where CONTRACT_address = lower('0x1F98431c8aD98523631AE4a59f267346ea31F984')
    and EVENT_NAME = 'PoolCreated'
    ORDER BY 2)
    union all
    (select
    'Optimism' as network,
    BLOCK_TIMESTAMP,
    TX_HASH,
    DECODED_LOG:fee/10000 as fee,
    DECODED_LOG:pool as pool_address,
    DECODED_LOG:tickSpacing as tickSpacing,
    DECODED_LOG:token0 as token0,
    DECODED_LOG:token1 as token1
    from Optimism.core.ez_decoded_event_logs
    where CONTRACT_address = lower('0x1F98431c8aD98523631AE4a59f267346ea31F984')
    and EVENT_NAME = 'PoolCreated'
    ORDER BY 2)
    union all
    (select
    'Polygon' as network,
    BLOCK_TIMESTAMP,
    TX_HASH,
    DECODED_LOG:fee/10000 as fee,
    DECODED_LOG:pool as pool_address,
    DECODED_LOG:tickSpacing as tickSpacing,
    Run a query to Download Data