gayatridodmaniPurchaser
    Updated 2022-11-26
    with cte as ( --common table expression used for creating a table with limited attributes
    select token_name, project_name, created_at_timestamp, seller, sales_amount, purchaser
    from solana.core.dim_nft_metadata as m inner join solana.core.fact_nft_sales as s on m.mint= s.mint
    where sales_amount is not null
    order by 5 desc
    )

    select token_name, purchaser, sum(sales_amount) as total_sales --Purchaser gives the wallet address that purchased NFT
    from cte
    where token_name like '%Degen Apes%' --Only the token name with Degen apes is filtered
    group by token_name, purchaser
    order by total_sales DESC --Sorting the total sales amount in descending order
    limit 100;
    Run a query to Download Data