winnie-fstop 10 in categories dapp excludes wallets copy
    Updated 2025-03-19
    -- forked from charliemarketplace / top 10 in categories dapp excludes wallets @ https://flipsidecrypto.xyz/charliemarketplace/q/WsyUQroOM8tz/top-10-in-categories-dapp-excludes-wallets

    -- forked from top 10 in categories gaming @ https://flipsidecrypto.xyz/studio/queries/76d996f7-8b65-41de-b608-bad269a9160a

    with near_projects as (
    select ADDRESS,
    initcap(PROJECT_NAME) as PROJECT_NAME,
    initcap(LABEL_TYPE) as LABEL_TYPE
    from near.core.dim_address_labels
    -- where LABEL_TYPE in ('dapp', 'games', 'defi', 'bridge', 'nft')
    where LABEL_TYPE in ('dapp')
    and PROJECT_NAME is not null
    ),

    projects_events as (
    select
    BLOCK_TIMESTAMP,
    TX_HASH,
    SIGNER_ID,
    RECEIVER_ID,
    PROJECT_NAME,
    ADDRESS,
    LABEL_TYPE,
    DEPOSIT/1e24 as Volume
    from near.core.fact_actions_events_function_call
    inner join near_projects
    on RECEIVER_ID=ADDRESS
    where RECEIPT_SUCCEEDED=true
    and block_timestamp >= '2024-11-01'
    ),

    monthly_metrics as (
    select
    date_trunc('month', block_timestamp) as month_ordering,
    INITCAP(TO_VARCHAR(date_trunc('month', block_timestamp), 'mon. yyyy')) as month_,
    project_name,
    Last run: 24 days ago
    MONTH_ORDERING
    MONTH_
    PROJECT_CATEGORY
    PROJECT_NAME
    CATEGORY_RANK
    # Tx
    # Unique Signers
    Direct $NEAR Volume (if applicable)
    1
    2025-02-01 00:00:00.000Feb. 2025DappHot Near Wallet316403521378213585
    2
    2025-02-01 00:00:00.000Feb. 2025DappPyth4288699854019
    3
    2025-02-01 00:00:00.000Feb. 2025DappMeme Cooking5251844154713
    4
    2025-02-01 00:00:00.000Feb. 2025DappLearn Near Club62561295173
    5
    2025-02-01 00:00:00.000Feb. 2025DappMintbase721840719158
    6
    2025-02-01 00:00:00.000Feb. 2025DappTkn81122017395
    7
    2025-02-01 00:00:00.000Feb. 2025DappHapi Protocol967055884867
    8
    2025-02-01 00:00:00.000Feb. 2025DappNear Social10212647240
    8
    615B
    28s