Query editor
SELECT get_href(get_chain_explorer_address('bitcoin',tx.input[1].script_pub_key.address), tx.input[1].script_pub_key.address) as input_address, round(sum(tx.fee + reduce(tx.output, 0, (s,ox) -> IF(ox.script_pub_key.address <> tx.input[1].script_pub_key.address or ox.index = 0, s + ox.value, s), s->s)), 8) as net_spend, round(sum(reduce(tx.output, 0, (s,ox) -> IF(ox.script_pub_key.address <> tx.input[1].script_pub_key.addressAND ox.script_pub_key.address <> '1111111111111111111114oLvT2', s + ox.value, s), s->s)), 8) as net_stack, round(sum(reduce(tx.output, 0, (s,ox) -> IF(ox.script_pub_key.address = '1111111111111111111114oLvT2' or ox.index = 0, s + ox.value, s), s->s)), 8) as net_burn-- , round(sum(tx.output[1].value), 8) as sunset_burn, round(sum(tx.fee), 8) as net_fee, round(avg(reduce(tx.output, 0, (s,ox) -> IF(ox.script_pub_key.address <> tx.input[1].script_pub_key.address or ox.index = 0, s + ox.value, s), s->s)), 8) as avg_commit, count(*) as block_commits, max(tx.block_height) as last_block, min(tx.block_height) as first_blockFROM bitcoin.transactions txWHERE 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 '['GROUP BY 1ORDER BY 2 DESCLIMIT 1000