Query editor
withraw_mint as (selectspent_tx_id as commit_txid,tx_id as reveal_txidfrombitcoin.inputswhereblock_date >= date '2023-11-26'and block_height >= 818565and cardinality(witness_data) >= 2and cast(witness_data[2] as varchar) like '%0461746f6d03646d74%' -- atom dmtand substr(witness_data[2],bytearray_position (witness_data[2], 0x6b6d696e745f7469636b657268) + 13,8) = 0x656c656374726f6e -- electronand substr(cast(spent_tx_id as varchar), 1, 9) = '0x1840000' -- bitworkc),minted as (selectreveal.block_time,reveal.block_height,reveal.index,reveal.output[1].script_pub_key.address as address,reveal.fee + commit.fee as fee,price as price_usd,54600 as amt,get_href ('https://ep.atomicals.xyz/proxy/blockchain.atomicals.get?params=[%22' || substr(cast(commit_txid as varchar), 3) || 'i0%22]','atomical_id') as atomical_id,commit_txid,substr(cast(reveal_txid as varchar), 3) as reveal_txidfromraw_mintleft join bitcoin.transactions commit on commit.block_date >= date '2023-11-26'and commit.block_height >= 818565and commit_txid = commit.idleft join bitcoin.transactions reveal on reveal.block_date >= date '2023-11-26'and reveal.block_height >= 818565and reveal_txid = reveal.idleft join prices.usd on blockchain is nulland symbol = 'BTC'and date_trunc('minute', reveal.block_time) = minutewherereveal.block_height - commit.block_height <= 3 -- https://github.com/atomicals/atomicals-electrumx/blob/master/electrumx/lib/util_atomicals.py#L54order byreveal.block_height,reveal.indexlimit18400)selectrank() over (order bysum(amt) desc) as "rank",get_href ('https://satsx.io/', address) as address,max(block_time) as last_minted_time,