SocioCryptohistogram
    Updated 2022-06-26
    --What's the average number of transactions per block? What's the max number of transactions we've seen in a block and the minimum?

    with bins as (
    select
    floor(tx_count) as bin_floor,
    count(block_number) as count
    from (
    SELECT block_number,
    tx_count
    FROM avalanche.core.fact_blocks
    WHERE block_timestamp::date >= '2022-06-20'
    )
    group by 1
    order by 1
    -- same query as above, just in a CTE
    )

    select
    bin_floor,
    bin_floor || ' - ' || (bin_floor + 1) as bin_range,
    count
    from bins
    order by 1;


    Run a query to Download Data