piperSolana - Solana NFT Project Feature: Types of buyers
    Updated 2022-07-20
    /*
    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
    DISTINCT(purchaser) as buyer
    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
    labels.label_type AS program_type,
    labels.label AS program_name,
    COUNT(transactions.signers[0]) number_of_transactions
    FROM
    solana.core.fact_transactions transactions
    JOIN
    solana.core.dim_labels labels
    ON
    transactions.instructions[0]:programId = labels.address
    WHERE
    transactions.block_timestamp >= '2022-06-14'
    AND
    labels.label_subtype != 'token_contract'
    Run a query to Download Data