Ant-DAO-MentLEAD&LAG
    Updated 2023-11-01
    with
    raw_data as (
    select
    *
    from
    external.tokenflow_eth.blocks
    where
    block between 15827610 and 15827615
    )
    -- LEAD&LAG Example
    select
    load_id,
    block,
    -- LEAD shows the next block
    LEAD(block) over (
    order by
    block
    ) as lead_block,
    -- LEAD shows the previous block
    LAG(block) over (
    order by
    block
    ) as lag_block
    from
    raw_data


    Run a query to Download Data