piperSolana - Solana NFT Project Feature: Totals
    Updated 2023-04-13
    /*
    Twitter: @der_piper
    Discrod: piper#6707

    Solana - Solana NFT Project Feature

    Choose a NFT project from the following list and create a dashboard with the new
    Flipside dashboard layout that can refresh once a day highlighting at least 4 metrics
    of your choosing that helps show the "health" of the project. Note any noticeable
    trends or current events for the project. Highlight how liquidity is flowing in and
    out of the project and what types of buyers and sellers are interacting with the project.
    */

    WITH all_sales AS (
    SELECT
    *
    FROM
    solana.core.fact_nft_sales
    WHERE
    mint in (SELECT DISTINCT(mint) AS mint FROM solana.core.dim_nft_metadata WHERE contract_name = 'Primates')
    )

    SELECT
    MAX(block_timestamp)AS date,
    COUNT(DISTINCT(tx_id)) AS number_of_sales,
    ROUND(AVG(sales_amount), 1) AS avergae_sales_amount,
    SUM(sales_amount) AS sales_volume,
    MIN(sales_amount) AS lowest_price,
    MAX(sales_amount) AS highest_price,
    COUNT(DISTINCT(purchaser)) AS number_of_buyers
    FROM
    all_sales

    /* The End! */
    Run a query to Download Data