MahrooUntitled Query
    Updated 2022-10-10
    select date_trunc('week',block_timestamp) as day,address_name,count (distinct tx_id) as sales,count (distinct purchaser) as buyers,
    avg(buyers) over (partition by address_name order by day) as avg_buyers_day,count (distinct seller) as sellers,count (distinct fns.mint) as mints,
    count (distinct marketplace) as distinct_marketplaces,sum (sales_amount) as volume,avg (sales_amount) as avg_volume,
    avg (volume) over (partition by address_name order by day rows between 6 preceding and current row) as "7d moving average"
    from solana.core.fact_nft_sales fns
    join solana.core.dim_labels dl on fns.mint=dl.address
    where (address_name in ('Collectorz Club: The Collectorz','The Suites','the suites token','Laidback Lions','Sports Rewind','stepn - run to earn')
    or label like '%stepn%')
    and SUCCEEDED = 'TRUE' and sales_amount > 0
    group by 1,2 order by 1
    Run a query to Download Data