h4wkbehavior5
    Updated 2024-01-29
    -- forked from behavior4 @ https://flipsidecrypto.xyz/edit/queries/e71459f4-deee-4039-8cb6-2922e6cac104

    -- forked from behavior3 @ https://flipsidecrypto.xyz/edit/queries/a382717f-85f3-41c5-bbc5-6d980a5bf3f9

    -- forked from behavior @ https://flipsidecrypto.xyz/edit/queries/473a4870-4a9a-4323-b5c0-25446586c82d

    -- forked from base @ https://flipsidecrypto.xyz/edit/queries/2aa3a59b-77ec-4785-bc43-0a139b7772ff

    with claimers as (
    select DISTINCT tx_to as claimer
    from solana.core.fact_transfers
    join solana.core.fact_events using (block_timestamp, tx_id)
    where block_timestamp >= '2024-01-26'
    and program_id = 'meRjbQXFNf5En86FXT2YPz1dQzLj4Yb3xK8u1MVgqpb'
    and mint = 'WENWENvqqNya429ubCdR81ZmD69brwQaaBYY6p3LCpk'
    and amount = 643652
    )

    , base as (
    select block_timestamp,
    tx_id,
    upper(label_type) as label,
    signers[0] as user
    from solana.core.fact_events
    join claimers on (signers[0] = claimer)
    join solana.core.dim_labels on (program_id = address)
    where block_timestamp::date >= CURRENT_DATE - 60 and block_timestamp < CURRENT_DATE
    and succeeded = True
    and label != 'solana'
    and upper(label_type) != 'TOKEN'
    )

    select
    label as protocol,
    count(distinct tx_id) as tx_count,
    count(distinct user) as user_count
    Last run: 12 months ago
    PROTOCOL
    TX_COUNT
    USER_COUNT
    1
    DEX108558475629593
    2
    DEFI63519531280824
    3
    DAPP75982873254169
    4
    NFT27186798244434
    5
    BRIDGE132519933438
    6
    GAMES3951776610
    6
    147B
    814s