omer93wetrump on sei v2 mints 2
    Updated 2025-01-22
    WITH info AS (
    SELECT
    case when origin_function_signature in ('0x23b872dd','0x42842e0e') then 2 else 1 end as nft_id,
    tx_hash,
    block_timestamp,
    from_address AS minter,
    to_address AS collection,
    0 AS attribute_value
    FROM
    sei.core_evm.fact_transactions
    WHERE
    block_timestamp > '2025-01-01'
    and origin_function_signature in ('0xc7b7cae6','0x4d27c543','0x42842e0e','0x23b872dd','0xefef39a1','0x03ee2733') and to_address='0x47b724277e72d0985927a58246035c436b93df90'
    --GROUP BY
    --tx_hash, block_timestamp, buyer, collection, attribute_value
    )
    select
    trunc(block_timestamp,'hour') as date,
    count(distinct tx_hash) as mints,
    sum(mints) over (order by date) as total_mints,
    sum(nft_id)*2 as distinct_nft_minted,
    sum(distinct_nft_minted) over (order by date) as total_nft_minted,
    count(distinct minter) as minters,
    sum(attribute_value) as sei_volume,
    sum(sei_volume) over (order by date) as total_sei_volume,
    avg(attribute_value) as avg_nft_price
    from info
    group by 1 order by 1 desc





    QueryRunArchived: QueryRun has been archived