omer93wetrump on sei 2nd sales
    Updated 2025-01-23
    WITH info AS (
    SELECT
    tx_hash,
    block_timestamp,
    from_address AS buyer,
    to_address AS collection,
    value AS attribute_value
    FROM
    sei.core_evm.fact_transactions
    WHERE
    block_timestamp > '2025-01-01'
    and origin_function_signature in ('0xa22cb465') and to_address='0x47b724277e72d0985927a58246035c436b93df90'
    --GROUP BY
    --tx_hash, block_timestamp, buyer, collection, attribute_value
    ),
    info2 AS (
    SELECT
    *,
    attribute_value as prices,
    19 AS sei_price,
    (sei_price) AS sei_volume
    FROM
    info
    )
    select
    count(distinct tx_hash) as sales,
    count(distinct tx_hash) as distinct_nft_sold,
    count(distinct buyer) as buyers,
    sum(sei_volume) as sei_volume,
    avg(sei_price) as avg_nft_price
    from info2



    QueryRunArchived: QueryRun has been archived