granadohoTop 10 Collections that Top 20 wallets Ape
    Updated 2022-04-13
    with wallet as (
    select
    purchaser,
    SUM(sales_amount) as total_purchase
    from solana.fact_nft_sales
    where (marketplace = 'magic eden v1' or marketplace = 'magic eden v2')
    and date(block_timestamp) >= '2022-03-01'
    group by 1
    order by total_purchase desc
    limit 20
    )

    select
    b.address_name as collection,
    count(a.mint) as sales_count
    from solana.fact_nft_sales a
    inner join solana.labels b
    on b.address = a.mint
    where (a.marketplace = 'magic eden v1' or a.marketplace = 'magic eden v2')
    and date(a.block_timestamp) >= '2022-03-01'
    and a.purchaser in (select purchaser from wallet)
    group by b.address_name
    order by sales_count desc limit 10
    Run a query to Download Data