StangFASTTop 5 NFTs popular
    Updated 2023-05-09
    -- forked from 05 - Top 5 NFTs @ https://flipsidecrypto.xyz/edit/queries/72d29748-b144-443e-80b3-edfc93cdcba6
    with

    nft_popular AS
    (
    SELECT

    --- top 5 nft ---
    b.token_name AS nft_name
    --- count ---
    , count( DISTINCT a.tx_hash ) AS transactions
    , count( DISTINCT a.seller_address ) AS sellers
    , count( DISTINCT a.buyer_address ) AS buyers

    --- usd ---
    , cast(round( avg( a.price_usd ) , 2 ) AS numeric(36,2)) AS price_usd
    , cast(round( avg( a.platform_fee_usd ) , 2 ) AS numeric(36,2)) AS platform_fees
    , cast(round( avg( a.creator_fee_usd ) , 2 ) AS numeric(36,2)) AS creator_fees
    , cast(round( avg( a.tx_fee_usd ) , 2 ) AS numeric(36,2)) AS transaction_fees

    , a.platform_name AS platform


    FROM
    ethereum.core.ez_nft_sales a

    INNER JOIN
    ethereum.core.dim_nft_metadata b
    ON a.nft_address = b.contract_address
    AND a.tokenid = b.token_id

    WHERE
    a.block_timestamp > current_date - 30
    AND a.block_timestamp <= dateadd( week , 0 , current_date )
    AND a.project_name = 'boredapeyachtclub'
    AND a.price_usd IS NOT NULL
    Run a query to Download Data