Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/with decodes as (select *from (SELECT-- row_number() OVER (order by t.block_height asc, t.index asc) as ordinal_number,output_value, try(t.output[2].value * 1e8) as creator_fee_sats, t.block_time as mint_time, t.block_height, t.size, t.virtual_size, t.fee*1e8 as fee, t.fee*1e8/t.virtual_size as sat_per_vbyte, try(t.output[2].script_pub_key.address) as creator_address, t.index, cast(t.id as varchar) as tx_id, t.hexFROM bitcoin.transactions twhere t.block_height >= 820000-- AND cast(t.hex as varchar) LIKE '%0063036f726401%' -- OP_FALSE (0x00) OP_IF (0x63) OP_PUSHBYTES3 (0x03) "ord" (0x6f7264) OP_1 (0x01) https://docs.ordinals.com/inscriptions.html-- AND t.input[1].witness_data[2] LIKE '%0063036f726401%' AND t.input[1].type = 'witness_v1_taproot' thenthis doesn't wwhenk because of array length checks-- order by ordinal_number desc-- and MOD(length(regexp_extract(cast(hex as varchar), '7b2(?:[^7]|7[^bd])*7d(?=[06])')),2) = 0))select creator_address, count(distinct tx_id) count_mints, sum(creator_fee_sats)/1e8 creator_fee_raised, avg(sat_per_vbyte) as avg_network_feesfrom decodeswhere creator_address = '{{creator_address}}'and creator_fee_sats = {{mint_price}}group by 1limit 100;