ajetifiscal-fuchsia copy
Updated 2024-10-09
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 monthly_sales AS (
SELECT
DATE_TRUNC('month', block_timestamp) AS month,
COUNT(tx_hash) AS sales_transactions,
COUNT(DISTINCT seller_address) AS unique_sellers,
COUNT(DISTINCT buyer_address) AS unique_buyers,
SUM(total_price) AS sales_volume_apt,
SUM(total_price_usd) AS sales_volume_usd
FROM
aptos.nft.ez_nft_sales
WHERE
project_name ILIKE '%Aptomingos%'
GROUP BY
1
),
new_buyers AS (
SELECT
DATE_TRUNC('month', MIN(block_timestamp)) AS first_purchase_month,
buyer_address
FROM
aptos.nft.ez_nft_sales
WHERE
project_name ILIKE '%Aptomingos%'
GROUP BY
buyer_address
)
SELECT
ms.month,
ms.sales_transactions,
ms.unique_sellers,
ms.unique_buyers,
COUNT(nb.buyer_address) AS new_buyers,
ms.sales_volume_apt,
ms.sales_volume_usd
FROM
monthly_sales ms
QueryRunArchived: QueryRun has been archived