Pine AnalyticsBribe Reward 3
    Updated 2025-01-29
    with tab1 as (
    SELECT DISTINCT tx_hash
    FROM base.core.fact_transactions
    WHERE to_address LIKE '0x16613524e02ad97edfef371bc883f2f5d6c480a5'
    ), tab2 as (
    SELECT
    date(hour) as day,
    token_address,
    symbol,
    decimals,
    avg(price) as token_price
    FROM base.price.ez_prices_hourly
    GROUP BY 1,2,3,4
    ), tab3 as (
    SELECT --*
    DISTINCT tx_hash
    FROM base.core.fact_decoded_event_logs
    WHERE tx_hash in (SELECT * FROM tab1)
    AND event_name LIKE 'ClaimRewards'
    )


    SELECT
    count(DISTINCT tx_hash) as claim_events,
    count(DISTINCT from_address) as users
    from base.core.fact_transactions
    WHERE tx_hash in (SELECT * from tab3)

    Last run: 15 days ago
    CLAIM_EVENTS
    USERS
    1
    38209014943
    1
    16B
    539s