flipsidecryptoReceipts, Bsc, Current
    Updated 2023-12-13
    -- forked from Transactions, Bsc, Current @ https://flipsidecrypto.xyz/edit/queries/417fe8e9-906f-4660-81cb-fd16bc0f484d

    -- forked from Blocks, Bsc, Current @ https://flipsidecrypto.xyz/edit/queries/a0742679-013b-4791-9ada-39d80dcf8a8b

    -- forked from Blocks, Avalanche, Current @ https://flipsidecrypto.xyz/edit/queries/bfd435ee-cb8e-4323-993f-d52d4670181d

    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,
    max(test_timestamp) as latest_test,
    proportion_impacted as incomplete,
    1 - proportion_impacted as complete
    from proportions
    where blockchain = 'bsc' and test_name = 'receipts'
    group by 1,2,4,5

    Run a query to Download Data