SocioCryptoSectors that Users Interacted with most
    Updated 2023-10-19
    with margin_users as (
    SELECT
    DISTINCT signers[0] as user
    FROM solana.core.fact_events
    WHERE program_id = 'MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA'
    AND block_timestamp::date >= '2023-02-07'
    )

    SELECT
    label_type,
    count(DISTINCT signers[0]) as count_user,
    count(DISTINCT tx_id)/ count(DISTINCT signers[0]) as n_action_per_user
    FROM solana.core.fact_events a
    JOIN solana.core.dim_labels b ON a.program_id = b.address
    WHERE signers[0] IN (SELECT user FROM margin_users)
    AND block_timestamp::date >= '2023-02-07'
    AND label_type != 'chadmin'
    GROUP BY label_type
    Run a query to Download Data