datavortexby marketplace
Updated 2025-02-04
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 SalesData AS (
SELECT
platform_name,
COUNT(DISTINCT ez_nft_sales_id) AS TotalNftSales,
COUNT(DISTINCT project_name) AS TotalCollections,
SUM(total_price_usd) AS TotalSalesVolume,
SUM(total_fees_usd) AS TotalFees,
SUM(creator_fee_usd) AS TotalCreatorFees,
SUM(platform_fee_usd) AS TotalPlatformFees
FROM aptos.nft.ez_nft_sales
WHERE block_timestamp >= current_timestamp - INTERVAL '1 month'
GROUP BY platform_name
),
UniqueTraders AS (
SELECT
platform_name,
COUNT(DISTINCT buyer_address) AS UniqueBuyers,
COUNT(DISTINCT seller_address) AS UniqueSellers
FROM aptos.nft.ez_nft_sales
WHERE block_timestamp >= current_timestamp - INTERVAL '1 month'
GROUP BY platform_name
)
SELECT
s.platform_name,
s.TotalNftSales,
s.TotalCollections,
s.TotalSalesVolume,
s.TotalCreatorFees,
s.TotalPlatformFees,
s.TotalFees,
t.UniqueBuyers,
t.UniqueSellers
FROM SalesData s
JOIN UniqueTraders t ON s.platform_name = t.platform_name
ORDER BY s.TotalSalesVolume DESC;
QueryRunArchived: QueryRun has been archived