mlhMonthly count of users(washers and non washers) for non royalty marketplaces
    Updated 2022-11-07
    SELECT
    date_trunc('month', min_buy) as day,
    CASE WHEN buy_time_diff < 30 AND sales > 1 THEN 'Wash Sale'
    ELSE 'non wash Sale' END as sales_type,
    sum(sales) as sales,
    COUNT(DISTINCT purchaser) as users
    from (SELECT purchaser,
    mint as m1,
    max(block_timestamp) as max_buy,
    min(block_timestamp) as min_buy,
    datediff('day', min(block_timestamp), max(block_timestamp)) buy_time_diff,
    count(*) as sales
    FROM solana.core.fact_nft_sales
    where marketplace in ('yawww', 'solanart', 'hadeswap', 'solport', 'coral cube')
    GROUP BY 1,2
    )
    GROUP BY 1,2
    Run a query to Download Data