Afonso_Diazgrouping blocks
    Updated 2024-08-09
    with t as (
    select
    proposer_address as validator,
    count(distinct block_id) as blocks
    from lava.core.fact_blocks
    where block_timestamp::date >= '2024-07-30'
    group by 1
    )

    select
    case
    when blocks < 5 then 'a. < 5 blocks'
    when blocks < 10 then 'b. 6 - 10 blocks'
    when blocks < 50 then 'c. 11 - 50 blocks'
    when blocks < 100 then 'd. 51 - 100 blocks'
    when blocks < 250 then 'e. 101 - 250 blocks'
    when blocks < 500 then 'f. 251 - 500 blocks'
    when blocks < 1000 then 'g. 501 - 1000 blocks'
    else 'h. > 1000 blocks'
    end as block_type,
    count(distinct validator) as validators
    from t
    group by 1
    order by 1

    QueryRunArchived: QueryRun has been archived