Pine AnalyticsScope 3 copy copy copy
    Updated 2025-04-03
    -- forked from Scope 3 copy copy @ https://flipsidecrypto.xyz/studio/queries/83f96934-9bc5-4ad4-8ebd-eb08ca686808

    with tab1 as (
    SELECT
    inner_instruction['instructions'][5]['parsed']['info']['newAccount'] as nft_mint
    from eclipse.core.fact_events
    where tx_id in (
    SELECT
    tx_id
    FROM eclipse.core.fact_transfers
    where tx_to like '7jB2kzg5FbuNjETEgjnERfznGMFs7sQ7nhoXcJzwJpxj'
    and block_timestamp > '2024-11-20'
    and mint like 'Eth1111111111111111111111111111111111111111'
    and amount = 40000000
    AND SUCCEEDED
    --LIMIT 100
    GROUP BY 1
    order by 1 DESC
    )
    and program_id like 'RariUNM3vz1rwxPg8UJyRAN7rSKXxgd2ncS2ddCa4ZE'
    )

    SELECT
    sum(price_eth) as eth_volume,
    count(*) as sales,
    median(price_eth) as median_price

    FROM (
    SELECT
    block_timestamp,
    tx_id,
    case when not pre_token_balances[0]['mint'] like 'So11111111111111111111111111111111111111112' then pre_token_balances[0]['mint']
    when not pre_token_balances[1]['mint'] like 'So11111111111111111111111111111111111111112' then pre_token_balances[1]['mint']
    when not pre_token_balances[2]['mint'] like 'So11111111111111111111111111111111111111112' then pre_token_balances[2]['mint']
    Last run: 22 days ago
    ETH_VOLUME
    SALES
    MEDIAN_PRICE
    1
    1881.18576624553080.409040238
    1
    35B
    234s