Updated 2022-09-28
    with
    base as (
    WITH
    userss as (
    select 'buyers' as type ,PURCHASER, BLOCK_TIMESTAMP from solana.core.fact_nft_sales
    UNION ALL
    select 'sellers' as type ,SELLER , BLOCK_TIMESTAMP from solana.core.fact_nft_sales )

    select
    MARKETPLACE,
    mint,
    sales_amount,
    tx_id,
    block_timestamp as Datea
    from solana.core.fact_nft_sales
    where Datea >= CURRENT_DATE -90 and Datea < CURRENT_DATE and succeeded = 'TRUE'
    ),

    Top10 as (select
    contract_name,
    sum(sales_amount) as Volume
    from solana.core.fact_nft_sales a
    join solana.core.dim_nft_metadata b on a.mint = b.mint
    where block_timestamp >= CURRENT_DATE -90 and block_timestamp < CURRENT_DATE
    and succeeded = 'TRUE'
    and marketplace in ('yawww')
    group by 1
    order by 2 desc
    limit 10)


    select
    date_trunc ('day', Datea) as Date,
    sum(sales_amount) as Volume,
    count(distinct(tx_id)) as Txn,
    Run a query to Download Data