SleepyMinters wallets Leaderboard
    Updated 2023-08-31
    with price_btc as (
    select
    date_trunc('day', hour) day,
    avg(price) price
    from ethereum.price.ez_hourly_token_prices
    where symbol ilike 'WBTC'
    group by day
    )

    select
    outputs[0]:scriptPubKey:address wallet,
    count(tx_id) minted_inscriptions,
    max(fact_tx.block_timestamp::date) last_mint_date,
    --sum(size) size_usage,
    --sum(virtual_size) virtual_size_usage,
    sum(fee) fees_btc
    --sum(fee*price) fees_usd
    from bitcoin.core.fact_transactions fact_tx
    join price_btc
    on fact_tx.block_timestamp::date = price_btc.day
    where block_number > 767429
    and hex like '%0063036f726401%'
    group by wallet
    order by minted_inscriptions desc
    limit 15
    Run a query to Download Data