bababaoyu38Top 10 Solana Defi protocols used by Marinade's Non-Fungible Chefs unique holders
    Updated 2022-05-05
    WITH diagram1 AS (
    SELECT
    DISTINCT ( tx_id ) as tx_id
    FROM solana.fact_events
    WHERE program_id = 'tovt1VkTE2T4caWoeFP6a2xSFoew5mNpd7FWidyyMuk'
    ),
    diagram2 as (
    SELECT
    distinct tx_from as wallets
    FROM solana.fact_transfers x
    JOIN diagram1 y
    ON x.tx_id = y.tx_id
    WHERE amount >= 1000
    AND mint = 'MNDEFzGvMt87ueuHvVU9VcTqsAP5b3fTGPsHuuPA5ey'
    AND block_timestamp >= '2022-04-04'
    )
    SELECT
    label, count ( distinct tx_id ) as number_of_usage
    FROM solana.fact_transactions x
    JOIN diagram2 y
    ON x.signers[0] = y.wallets
    JOIN solana.dim_labels Z
    ON X.instructions[0]:programId = Z.address
    WHERE succeeded = 'TRUE'
    AND label_type != 'nft'
    AND label_subtype != 'token_contract'
    AND label != 'solana'
    GROUP BY label
    ORDER BY number_of_usage DESC
    LIMIT 10
    Run a query to Download Data