mmdrezaDistribution Of Buyers By total Purchase count(Hyperspace)
    Updated 2022-10-29
    with hyperspace as (
    select 'Hyperspace' as platform,
    purchaser,
    count (distinct tx_id) as Sales_Count
    from solana.core.fact_nft_sales
    where marketplace = 'hyperspace'
    and succeeded = 'TRUE'
    group by 1,2),
    coral_cube as (select 'Coral Cube' as platform,
    purchaser,
    count (distinct tx_id) as Sales_Count
    from solana.core.fact_nft_sales
    where marketplace = 'coral cube'
    and succeeded = 'TRUE'
    group by 1,2)

    select
    platform,
    count (distinct purchaser) as Buyers_Count,
    case when sales_count = 1 then '1 Trade'
    when sales_count > 1 and sales_count <= 5 then '2 - 5 Trades'
    when sales_count > 5 and sales_count <= 10 then '6 - 10 Trades'
    when sales_count > 10 and sales_count <= 15 then '11 - 15 Trades'
    when sales_count > 15 and sales_count <= 20 then '16 - 20 Trades'
    when sales_count > 20 and sales_count <= 50 then '21 - 50 Trades'
    else 'More Than 50 Trades' end as type
    from hyperspace
    group by 1,3

    Run a query to Download Data