Updated 2024-04-25
    with
    ordinals as (
    select
    block_timestamp,
    block_number,
    tx_id,
    tx_id || 'i0' as inscription_id,
    labels.project_name as collection,
    labels.address_name as inscription_number,
    fee, -- BTC
    input_value,
    output_value,
    size, -- Byte
    virtual_size, -- vByte
    fee * pow(10, 8) / virtual_size as fee_rate, -- sat/vB,
    outputs[0]:scriptPubKey:address as minter,
    hex
    from
    bitcoin.core.fact_transactions transactions
    join crosschain.core.dim_labels labels on transactions.tx_id || 'i0' = labels.address
    where
    block_number > 767429
    and hex like '%0063036f726401%'
    and labels.blockchain = 'bitcoin'
    and labels.label_type = 'nft'
    )
    select
    collection as "Chromatica",
    count(distinct inscription_id) as "Inscriptions",
    replace(min(inscription_number), 'inscription') as "First Inscription Number",
    replace(max(inscription_number), 'inscription') as "Last Inscription Number",
    count(distinct minter) as "Minters",
    sum(size) as "Size [Byte]",
    sum(virtual_size) as "Virtual Size [vByte]",
    sum(fee) as "Fees [BTC]",
    avg(fee_rate) as "Average Fee Rate [sat/vB]",