Ericmoore_11Aptos Top 15 NFTs
    Updated 2024-11-11
    SELECT
    date_trunc('day', block_timestamp) as week,
    project_name,
    count(*) as sales,
    sum(sales) over (partition by project_name order by week) as total_sales,
    count(distinct buyer_address) as nft_buyers,
    count(distinct seller_address) as nft_sellers,
    SUM(TOTAL_PRICE) AS sales_volume,
    SUM(sales_volume) over (partition by project_name order by week) as total_sales_volume,
    AVG(TOTAL_PRICE) AS average_sale_price,
    SUM(creator_fee) as creator_fees,
    SUM(creator_fees) over (partition by project_name order by week) as total_creator_fees,
    SUM(platform_fee) as platform_fees,
    SUM(platform_fees) over (partition by project_name order by week) as total_platform_fee,
    SUM(total_fees) as fees,
    SUM(fees) over (partition by project_name order by week) as total_cumulative_fees,
    FROM aptos.nft.ez_nft_sales
    WHERE block_timestamp<trunc(current_date,'day') and block_timestamp>=trunc(current_date,'day')-7
    AND project_name IS NOT NULL
    AND total_price{{param_Y3uR}} IS NOT NULL
    AND project_name in (
    SELECT project_name from (select project_name, sum(total_price_usd) as volume
    FROM aptos.nft.ez_nft_sales
    WHERE project_name IS NOT NULL
    AND block_timestamp<trunc(current_date,'day') and block_timestamp>=trunc(current_date,'day')-7

    GROUP BY 1
    ORDER BY 2 DESC
    LIMIT 15
    ))
    GROUP BY 1,2
    ORDER BY 1 DESC
    QueryRunArchived: QueryRun has been archived