Query editor
withraw_mint as (selectdate_trunc('hour', block_time) as block_hour,substr(witness_data[2],bytearray_position (witness_data[2], 0x6b6d696e745f7469636b6572) + 13) as raw_tick,spent_tx_id as commit_txid,tx_id as reveal_txidfrombitcoin.inputswhereblock_date >= date '2023-09-17'and block_height >= 808081and cardinality(witness_data) >= 2and cast(witness_data[2] as varchar) like '%0461746f6d03646d74%' -- atom dmt),mint as (selectcasewhen bytearray_starts_with (raw_tick, 0x61746f6d6963616c73) then 'atomicals'when bytearray_starts_with (raw_tick, 0x61746f6d69) then 'atomi'when bytearray_starts_with (raw_tick, 0x61746f6d) then 'atom'when bytearray_starts_with (raw_tick, 0x6963616c73) then 'icals'when bytearray_starts_with (raw_tick, 0x7265616c6d) then 'realm'when bytearray_starts_with (raw_tick, 0x626974766d) then 'bitvm'when bytearray_starts_with (raw_tick, 0x646d696e74) then 'dmint'when bytearray_starts_with (raw_tick, 0x61766d) then 'avm'when bytearray_starts_with (raw_tick, 0x656c656374726f6e) then 'electron'when bytearray_starts_with (raw_tick, 0x6e657574726f6e) then 'neutron'when bytearray_starts_with (raw_tick, 0x717561726b) then 'quark'when bytearray_starts_with (raw_tick, 0x647261676f6e) then 'dragon'when bytearray_starts_with (raw_tick, 0x736f70686f6e) then 'sophon'else 'others'end as ft,reveal.output[1].script_pub_key.address as address,reveal.fee + commit.fee as fee,price as price_usd,reveal_txidfromraw_mintleft join bitcoin.transactions commit on commit.block_date >= date '2023-09-17'and commit.block_height >= 808081and commit_txid = commit.idleft join bitcoin.transactions reveal on reveal.block_date >= date '2023-09-17'and reveal.block_height >= 808081and reveal_txid = reveal.idleft join prices.usd on blockchain is nulland symbol = 'BTC'and date_trunc('hour', reveal.block_time) = minute)selectft,count(distinct address) as unique_address,count(1) as mint_count,sum(fee) as total_fee_btc,sum(fee * price_usd) as total_fee_usdfrommint