Query editor
with stakers as (select sum( varbinary_to_uint256(varbinary_substring(data,69)) / 1000000000000000000) as tokens from ethereum.transactionswhere block_number > 19517548and successand to = 0xb6D149C8DdA37aAAa2F8AD0934f2e5682C35890Band varbinary_starts_with(data, 0xbf6eac2f)group by "from"),groups as (select if(tokens < 2000, '0 - 2000', '') as g1,if(tokens >= 2000 and tokens < 5000, '2000 - 5000', '') as g2,if(tokens >= 5000 and tokens < 10000, '5000 - 10000', '') as g3,if(tokens >= 10000, '10000 - inf', '') as g4from stakers)select g1 || g2 || g3 || g4 as tokens, count(*) as wallets from groups group by g1 || g2 || g3 || g4 order by wallets desc