jackguyCopy of y00ts vs Art Gobblers
    Updated 2023-01-10
    with tab1 as (
    select
    *
    from solana.core.fact_transactions
    where inner_instructions[1]:instructions[3]:accounts[12] LIKE 'yootn8Kf22CQczC732psp7qEqxwPGSDQCFZHkzoXp25'
    ), tab2 as (
    select
    mint
    from solana.core.fact_nft_mints tab3
    inner join tab1 on tab1.tx_id=tab3.tx_id
    ), tab4 as (
    select tab5.*
    from solana.core.fact_nft_sales tab5
    inner join tab2 on tab2.mint=tab5.mint
    ), tab7 as (
    select date_trunc('hour', block_timestamp) as time2,
    marketplace,
    sum(sales_amount) as sales_volume,
    min(sales_amount) as median_price,
    COUNT(*) as sales
    from tab4
    group by 1,2
    ), tab6 as (
    select
    date_trunc('hour', RECORDED_HOUR) as time1,
    avg(close) as avg_prce
    from solana.core.fact_token_prices_hourly
    where symbol LIKE 'SOL'
    group by 1
    )

    select
    time1,

    median(median_price * avg_prce) as median_price
    from tab7
    Run a query to Download Data