mu-tafaUntitled Query
    Updated 2022-10-28
    with solprice as (
    SELECT
    date_trunc(day,hour) as date,
    avg(price) as solprice
    from ethereum.core.fact_hourly_token_prices
    where token_address=lower('0xD31a59c85aE9D8edEFeC411D448f90841571b89c')
    group by 1
    )
    select 'Hyperspace' as platform,
    sum (sales_amount*solprice) as Total_USD_Volume,
    AVG (sales_amount*solprice) as AVG_USD_Volume,
    Min (sales_amount*solprice) as Min_USD_Volume,
    Max (sales_amount*solprice) as Max_USD_Volume
    from solana.core.fact_nft_sales x join solprice y on x.block_timestamp::date = y.date
    where succeeded = 'TRUE'
    and marketplace = 'hyperspace'

    UNION ALL

    select 'coral cube' as platform,
    sum (sales_amount*solprice) as Total_USD_Volume,
    AVG (sales_amount*solprice) as AVG_USD_Volume,
    Min (sales_amount*solprice) as Min_USD_Volume,
    Max (sales_amount*solprice) as Max_USD_Volume
    from solana.core.fact_nft_sales x join solprice y on x.block_timestamp::date = y.date
    where succeeded = 'TRUE'
    and marketplace = 'coral cube'

    Run a query to Download Data