Sleepyinscriptions by type daily
    Updated 2023-08-31
    with ordinals as (
    select
    block_timestamp,
    tx_id,
    fee,
    outputs[0]:scriptPubKey:address minter,
    size,
    virtual_size,
    hex,
    regexp_instr(hex, '0063036f72640101') starting_point,
    substr(hex, starting_point + 16, 2) bytes_pushed,
    ethereum.public.udf_hex_to_int(bytes_pushed) content_length,
    substr(hex, starting_point + 18, content_length * 2) content_hex,
    try_hex_decode_string(content_hex) content,
    split_part(content, '/', 1) content_type,
    split_part(content, '/', 2) content_subtype
    from bitcoin.core.fact_transactions
    where block_number > 767429
    and block_timestamp::date < current_date
    and hex like '%0063036f726401%'
    ),
    dates as(
    select date_day day
    from ethereum.core.dim_dates
    where date_day between '2022-12-14' and current_date
    ),
    types as(
    select
    column1 type
    from
    (values
    ('image'),
    ('text'),
    ('application'),
    ('audio'),
    ('video'),
    Run a query to Download Data