mariyaLet it burn!
Updated 2022-04-27
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH sales as (
SELECT PURCHASER, SUM(SALES_AMOUNT) total_sales, COUNT(*) AS sale_count
FROM solana.fact_nft_sales
WHERE SUCCEEDED = 'TRUE'
AND DATE(BLOCK_TIMESTAMP) >= '2022-03-01' and marketplace = 'magic eden v2' or marketplace = 'magic eden v1' and SUCCEEDED = 'TRUE'
GROUP BY PURCHASER
)
,
TOP_20_SALES as ( SELECT top 10 *
FROM sales
where sale_count >= 50
ORDER BY total_sales DESC
)
,
sales_mints as (
SELECT mint, SALES_AMOUNT , tx_id, PURCHASER
FROM solana.fact_nft_sales
WHERE SUCCEEDED = 'TRUE'
AND DATE(BLOCK_TIMESTAMP) >= '2022-03-01'
AND PURCHASER IN(
SELECT PURCHASER from TOP_20_SALES
)
)
,
sales_mints as (
SELECT mint , SALES_AMOUNT , tx_id, PURCHASER
FROM solana.fact_nft_sales
WHERE SUCCEEDED = 'TRUE'
AND DATE(BLOCK_TIMESTAMP) >= '2022-03-01' AND marketplace = 'magic eden v1' or marketplace = 'magic den v2'
AND PURCHASER IN(
SELECT PURCHASER from top_20_sales
)
)
,
final_result as ( select t1.mint, SALES_AMOUNT, tx_id, PURCHASER , ADDRESS_NAME as Collection
from sales_mints t1
Run a query to Download Data