afonsoUntitled Query
    Updated 2023-01-21
    with list as
    (
    select *,
    row_number() over (ORDER BY block_timestamp asc) as rn
    from osmosis.core.fact_blocks
    where block_timestamp >= current_date - interval '3 months'
    ),
    list2 as (
    select datediff(s, o1.block_timestamp, o2.block_timestamp) as diff
    from list o1 join list o2
    on o1.rn + 1 = o2.rn
    )

    select
    min(diff) as min_gap_time,
    avg(diff) as average_gap_time,
    median(diff) as median_gap_time,
    max(diff) as max_gap_time
    from list2
    Run a query to Download Data