Team 6Query 5-1
Updated 2023-11-19
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
›
⌄
--- Add a parameter for the date in the previous query, so the user can enter
--- the start and end dates to see the total secondary sales
--- and revenue between specific dates.
SELECT
sales.tokenid as token_no,
meta.token_name,
Round(SUM(sales.total_fees),2) as total_sales_eth,
ROUND(SUM(sales.total_fees_usd),2) as total_sales_usd,
ROUND(SUM(sales.creator_fee),2) as creator_fee_eth,
ROUND(SUM(sales.creator_fee_usd),2) as creator_fee_usd,
sales.platform_name
FROM
ethereum.nft.dim_nft_metadata meta,
ethereum.nft.ez_nft_sales sales
WHERE
meta.project_name LIKE '%art%blocks'
AND meta.token_name LIKE '%fidenza%'
AND sales.tokenid = meta.token_id
AND sales.platform_name LIKE '%opensea'
GROUP BY
meta.token_name,
sales.tokenid,
sales.platform_name
ORDER BY
token_no DESC; {{Start Date}}{{End Date}}
Run a query to Download Data