piperSolana - Unique Solana Programs: Usage by Types
    Updated 2022-07-03
    /*
    Twitter: @der_piper
    Discrod: piper#6707

    Solana - Unique Solana Programs

    Q92. One way to track developer growth in an ecosystem is through the number
    of unique contracts used. Create a visualization of the number of unique programs
    used per day since the beginning of January.

    What type of programs are the most popular, and what programs seem to be gaining
    in popularity over that timeframe? Does it appear that development is still ongoing
    in the bear market?
    */

    SELECT
    COUNT(a.tx_id) AS number_of_transactions,
    b.label_type AS type,
    CASE
    WHEN type = 'dex' THEN '1. DEX'
    WHEN type = 'chadmin' THEN '2. chadmin'
    WHEN type = 'nft' THEN '3. NFT'
    WHEN type = 'defi' THEN '4. DeFi'
    WHEN type = 'dapp' THEN '5. DApp'
    WHEN type = 'layer2' THEN '6. Layer 2'
    END AS program_type
    FROM
    solana.core.fact_events a
    JOIN
    solana.core.dim_labels b
    ON
    a.program_id = b.address
    WHERE
    a.block_timestamp >= '2022-01-01'
    AND
    a.block_timestamp <= '2022-07-03'
    Run a query to Download Data