Query editor
select count(distinct tx.block_height) FILTER(WHERE ox.index = 0) as commit_blocks, count(*) FILTER(WHERE ox.index = 0) as commit_txs, count(distinct tx.input[1].script_pub_key.address) FILTER(WHERE ox.index = 0) as miners_uniq, count(distinct ox.script_pub_key.address) FILTER(WHERE ox.script_pub_key.address <> '1111111111111111111114oLvT2'AND ox.index > 0) as stackers_uniq, round(coalesce(sum(tx.fee) FILTER(WHERE ox.index = 0), 0)+ coalesce(sum(ox.value), 0), 8) as net_spend, coalesce(round(sum(ox.value) FILTER(WHERE ox.script_pub_key.address <> '1111111111111111111114oLvT2'AND ox.index > 0), 8), 0) as net_stack, coalesce(round(sum(ox.value) FILTER(WHERE ox.script_pub_key.address = '1111111111111111111114oLvT2'OR ox.index = 0 -- OP_RETURN), 8), 0) as net_burn, coalesce(round(sum(tx.fee) FILTER(WHERE ox.index = 0), 8), 0) as net_feeFROM bitcoin.transactions txCROSS JOIN UNNEST(tx.output) as oxWHERE tx.block_height >= 666050 -- Stacks 2.0 genesisAND tx.input_count = 1AND tx.output_count between 2 and 4AND starts_with(tx.output[1].script_pub_key.hex, 0x6a4c5058325b) -- OP_RETURN + OP_PUSHDATA1(0x50) + magic 'X2' + stx_op '['AND (ox.index = 0OR ox.script_pub_key.address <> tx.input[1].script_pub_key.address -- ignore change / pay to self)