fb3ce38c-7bfe-475c-bca8-3f1e44ae80a6Dapper_combined_products_month
Updated 2024-09-03
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 ranked_buyers AS (
SELECT
buyer,
DATE_TRUNC('{{param__Ix2}}', block_timestamp) AS first_purchase_date,
NFT_COLLECTION,
ROW_NUMBER() OVER (
PARTITION BY
buyer
ORDER BY
block_timestamp
) AS rn
FROM
flow.nft.ez_nft_sales
WHERE
NFT_COLLECTION IN ('A.e4cf4bdc1751c65d.AllDay', 'A.329feb3ab062d289.UFC_NFT', 'A.0b2a3299cc857e29.TopShot')
),
first_time_buyers AS (
SELECT
buyer,
first_purchase_date,
NFT_COLLECTION
FROM
ranked_buyers
WHERE
rn = 1
)
SELECT
COUNT(*) AS Txn_Volume,
SUM(price) AS Net_Sales,
COUNT(DISTINCT f.seller) AS unique_daily_seller,
COUNT(DISTINCT f.buyer) AS unique_daily_buyer,
COUNT(DISTINCT ftb.buyer) AS first_time_buyers_count,
DATE_TRUNC('{{param_Fc5w}}', f.block_timestamp) AS block_timestamp,
QueryRunArchived: QueryRun has been archived