pine_samitotal sales
    Updated 2023-07-20
    with sol_price_USD as (
    select date_trunc('hour', recorded_hour) as hour,
    avg(close) as price
    from solana.core.fact_token_prices_hourly
    where symbol = 'SOL'
    and close>0
    group by hour
    )
    SELECT
    sum(a.sales_amount*b.price) as volume,
    count(distinct a.PURCHASER) as PURCHASERs,
    count(distinct a.MINT) as NFTs,
    volume/PURCHASERs as "volume per PURCHASER",
    volume/NFTs as "volume per NFTs"
    FROM solana.core.fact_nft_sales a inner join sol_price_USD b on date_trunc('hour', a.block_timestamp) = b.hour
    WHERE a.marketplace='exchange art'
    and SUCCEEDED='TRUE'
    and a.sales_amount>0


    Run a query to Download Data