freemartianMin & max block Time
    Updated 2022-12-06
    with base as (
    select block_id as first_block_number, block_timestamp
    from terra.core.fact_transactions
    where block_timestamp >= CURRENT_DATE - {{Past_X_Days}}

    ),
    base1 as (
    select first_block_number + 1 as second_block_number, block_timestamp
    from base
    ),
    info as (
    select ft.block_id as bn, timestampdiff('SECOND', base1.block_timestamp, base.block_timestamp) AS time_diff
    from terra.core.fact_transactions ft
    inner join base on base.first_block_number = ft.block_id
    inner join base1 on base1.second_block_number = ft.block_id)
    select
    min(time_diff) as minimum_blocktime,
    max(time_diff) as maximum_blocktime
    from info
    Run a query to Download Data