BlazeWEN direction copy
    Updated 2024-02-12
    -- forked from WEN direction @ https://flipsidecrypto.xyz/edit/queries/ea3eebd8-75c6-46d2-8d90-222b1983f8f8

    -- forked from JUP direction @ https://flipsidecrypto.xyz/edit/queries/920839c7-8c0d-430d-85b4-15dec7bd4761

    -- forked from PYTH direction @ https://flipsidecrypto.xyz/edit/queries/fb4e112e-e5aa-4aab-92b7-91f78a3debc1
    WITH airdrops AS (
    SELECT DISTINCT
    block_timestamp,
    tx_id
    FROM solana.core.fact_events
    WHERE succeeded
    AND program_id = 'meRjbQXFNf5En86FXT2YPz1dQzLj4Yb3xK8u1MVgqpb'
    and block_timestamp<'2024-01-30'
    ),
    claimers AS (
    SELECT
    tx_to as wallet_address,
    643652 AS total_amt
    FROM solana.core.fact_transfers
    JOIN airdrops USING (block_timestamp, tx_id)
    WHERE lower(mint) = lower('WENWENvqqNya429ubCdR81ZmD69brwQaaBYY6p3LCpk')
    GROUP BY 1
    ),
    swaps as(
    select
    c.wallet_address,
    sum(case
    when lower(swap_from_mint)=lower('WENWENvqqNya429ubCdR81ZmD69brwQaaBYY6p3LCpk') then swap_from_amount
    else 0
    end) as send,
    sum(case
    when lower(swap_to_mint)=lower('WENWENvqqNya429ubCdR81ZmD69brwQaaBYY6p3LCpk') then swap_to_amount
    else 0
    end) as rec,
    -- sum(total_amt),
    rec-send as net_swap
    Last run: about 1 year ago
    DIRECTION
    COUNT(WALLET_ADDRESS)
    1
    Increase202760
    2
    Sell All7600
    3
    Decrease29683
    4
    Partial Hold24845
    5
    Hold401891
    5
    97B
    224s