Afonso_Diaz by marketplace
    Updated 2025-04-15
    with

    main as (
    select
    tx_hash,
    block_timestamp,
    buyer_address,
    seller_address,
    price,
    platform_name,
    price_usd,
    nft_address,
    token_id,
    platform_fee_usd
    from
    near.nft.ez_nft_sales
    where
    nft_address = 'tinkerunion_nft.enleap.near'
    )

    select
    platform_name,
    count(distinct tx_hash) as transactions,
    sum(price) as volume_near,
    sum(price_usd) as volume_usd,
    sum(platform_fee_usd) as total_platform_fee_usd,
    avg(platform_fee_usd) as average_platform_fee_usd
    from
    main
    group by 1