CryptoIcicle36.Solana-Magic Eden Volume Trends
    Updated 2022-03-12
    -- Create a visualization of Magic Eden total sales volume per day since January 1st.
    -- How has sales volume trended over time?
    -- Are there any trends to when sales volume seems to go up or down on certain days of the week or during certain times of the day?
    -- Are users more likely to trade a NFT during the week or the weekend?

    -- Payout 0.56 SOL
    -- Grand Prize 1.68 SOL
    -- Level Beginner


    -- Hint: Magic Eden has changed recently to a new contract so you will need two ProgramIDs
    -- Old: MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8
    -- New: M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K

    -- Sample Query:
    -- WITH secondary_sales AS (
    -- SELECT block_timestamp, block_id, blockchain, recent_block_hash, tx_id, mint,
    -- succeeded, pretokenbalances, posttokenbalances, instruction, inner_instruction,
    -- inner_instruction:instructions[0]:parsed:info:lamports/POW(10,9) as price_0, inner_instruction:instructions[1]:parsed:info:lamports/POW(10,9) as price_1, inner_instruction:instructions[2]:parsed:info:lamports/POW(10,9) as price_2, inner_instruction:instructions[3]:parsed:info:lamports/POW(10,9) as price_3, COALESCE (inner_instruction:instructions[4]:parsed:info:lamports/POW(10,9), 0) as price_4, (price_0 + price_1 + price_2 + price_3 + price_4) AS sales_price FROM solana.nfts
    -- WHERE date(block_timestamp) >= '2022-01-01'
    -- AND instruction:programId = __________________________________
    -- AND array_size(inner_instruction:instructions) > 2
    -- )



    with secondary_sales as (
    select
    block_timestamp, block_id, blockchain, recent_block_hash, tx_id, mint,
    succeeded, pretokenbalances, posttokenbalances, instruction, inner_instruction,
    inner_instruction:instructions[0]:parsed:info:lamports/pow(10,9) as price_0,
    inner_instruction:instructions[1]:parsed:info:lamports/pow(10,9) as price_1,
    inner_instruction:instructions[2]:parsed:info:lamports/pow(10,9) as price_2,
    inner_instruction:instructions[3]:parsed:info:lamports/pow(10,9) as price_3,
    coalesce (inner_instruction:instructions[4]:parsed:info:lamports/pow(10,9), 0) as price_4,
    (price_0 + price_1 + price_2 + price_3 + price_4) as sales_price
    Run a query to Download Data