CryptoIcicleOptimism NFT Purchasing Behavior - Sale Metrics
    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
    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
    FROM ethereum.core.ez_nft_sales
    WHERE block_timestamp >= '{{start_date}}'
    AND currency_symbol IN ('WETH', 'ETH')
    )

    select * from (
    (SELECT AVG(price) as avg_price, MAX(price) as max_price,MEDIAN(price) as median_price, 'optimism' as type FROM nft_sales_optimism)
    union (SELECT AVG(price) as avg_price, MAX(price) as max_price,MEDIAN(price) as median_price,'ethereum' as type FROM nft_sales_ethereum)
    ) order by type
    Run a query to Download Data