CryptoIcicleOptimism NFT Purchasing Behavior - Ethereum
    Updated 2022-10-20
    -- Optimism NFT Purchasing Behavior
    -- Show the distribution of all NFT sales on Optimism by price. What percentage of all sales have been above .01 ETH? Above .1 ETH? 1 ETH?

    -- Pay by Quality Your score determines your final payout.
    -- Grand Prize 75 USDC (A score of 11 or 12 earns you a Grand Prize title)
    -- Payout 50 USDC
    -- Score Multiplier 0-7 : 0% 8 : 50% 9 : 75% 10 : 100% 11 : 125% 12 : 150%
    -- Payout Network Ethereum
    -- Level Beginner
    -- Difficulty Medium
    -- Show the distribution of all NFT sales on Optimism by price.
    -- What percentage of all sales have been above .01 ETH? Above .1 ETH? 1 ETH?
    -- Do you think that there is a limit to how high a floor for a NFT collection on Optimism can reach compared to on Ethereum?

    -- SQL Credit: https://app.flipsidecrypto.com/velocity/queries/3f1afbda-9855-4616-8d0f-04c64c048e9c

    WITH nft_sales_optimism AS (
    SELECT block_timestamp, tx_hash, nft_address, buyer_address, seller_address, total_fees, price as prc
    FROM optimism.core.ez_nft_sales
    WHERE currency_address = 'ETH'
    and block_timestamp >= '{{start_date}}'
    ),

    nft_sales_ethereum AS (
    SELECT block_timestamp, tx_hash, nft_address, buyer_address, seller_address, total_fees, price as prc
    FROM ethereum.core.ez_nft_sales
    WHERE block_timestamp >= '{{start_date}}'
    AND currency_symbol IN ('WETH', 'ETH')
    )

    select
    *,
    sum(vol) over (partition by price order by week asc rows between unbounded preceding and current row) as cum_vol,
    sum(num_sales) over (partition by price order by week asc rows between unbounded preceding and current row) as cum_num_sales,
    sum(n_buyers) over (partition by price order by week asc rows between unbounded preceding and current row) as cum_n_buyers
    from (
    Run a query to Download Data