Ali3NOverall Stats Hyperspace vs Coral Cube
    Updated 2022-10-27
    with SOLPricet as (
    select block_timestamp::date as date,
    avg (swap_to_amount/swap_from_amount) as SOLprice
    from solana.fact_swaps
    where swap_from_mint = 'So11111111111111111111111111111111111111112' --SOL
    and swap_to_mint in ('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v','Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB') --USDC,USDT
    and swap_to_amount > 0
    and swap_from_amount > 0
    and succeeded = 'TRUE'
    group by 1)

    select 'Hyperspace' as platform,
    count (distinct tx_id) as Sales_Count,
    count (distinct purchaser) as Buyers_Count,
    count (distinct seller) as Sellers_Count,
    count (distinct mint) as NFTS_Count,
    sum (sales_amount) as Total_SOL_Volume,
    sum (sales_amount*solprice) as Total_USD_Volume,
    AVG (sales_amount) as AVG_SOL_Volume,
    AVG (sales_amount*solprice) as AVG_USD_Volume,
    Median (sales_amount) as Median_SOL_Volume,
    Median (sales_amount*solprice) as Median_USD_Volume,
    Min (sales_amount) as Min_SOL_Volume,
    Min (sales_amount*solprice) as Min_USD_Volume,
    Max (sales_amount) as Max_SOL_Volume,
    Max (sales_amount*solprice) as Max_USD_Volume
    from solana.core.fact_nft_sales t1 join solpricet t2 on t1.block_timestamp::date = t2.date
    where marketplace = 'hyperspace'
    and succeeded = 'TRUE'

    union ALL

    select 'Coral Cube' as platform,
    count (distinct tx_id) as Sales_Count,
    count (distinct purchaser) as Buyers_Count,
    count (distinct seller) as Sellers_Count,
    Run a query to Download Data