flipsidecryptoAll Tests, Bsc, Current
    Updated 2023-12-20
    -- forked from All Tests, Avalanche, Current @ https://flipsidecrypto.xyz/edit/queries/8d4c535f-d8c1-498a-a744-cdd8838df987

    with test_data as (
    select
    *,
    max(max_block) over (order by test_timestamp) -
    min(min_block) over (order by test_timestamp) + 1 as total_blocks_at_time
    from
    bi_analytics.core.fact_data_observability_results

    ),
    proportions as (
    select
    blockchain,
    test_name,
    test_timestamp,
    blocks_impacted_count / total_blocks_at_time as proportion_impacted
    from
    test_data
    )
    select
    blockchain,
    test_name,
    proportion_impacted as "%_INCOMPLETE",
    1 - proportion_impacted as "%_COMPLETE",
    max(test_timestamp) as last_test_timestamp
    from proportions
    where blockchain = 'bsc'
    group by 1,2,3
    order by 1,2 asc



    Run a query to Download Data