Query editor
select block_height - block_height % 1000 as block_height, substr(script_hex,8,2) as version, count(*) as outputs-- , sum(fee)-- , sum(value)-- , avg(size)from bitcoin.outputswhere starts_with(script_hex, 0x6a)and length(script_hex) = 83-- and substr(script_hex,4,1) = 0x00 -- block height top byteand substr(script_hex,8,2) between 0x0001 and 0x000f -- version-- and substr(script_hex,56,4) > 0x5b900000 -- timestampand abs(to_unixtime(block_time) - varbinary_to_integer(substr(script_hex,56,4))) < 100e3group by 1, 2order by 1, 2