B09Fidenza 3_1
Updated 2023-11-18
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 ResaleCounts AS (
SELECT TOKENID, COUNT(*) AS ResaleCount
FROM ethereum.nft.ez_nft_sales
WHERE TOKENID IN (
SELECT TOKENID
FROM ethereum.nft.dim_nft_collection_metadata
WHERE NFT_ADDRESS = '0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270'
AND TOKENID_NAME LIKE 'Fidenza%'
)
GROUP BY TOKENID
)
--3. For the Fidenza project, find the art piece (nft) that has been resold the most
-- and list the token# and average holding time. Include a link to the item on opensea
-- in the comments on the dashboard. If possible, add the NFT image to the dashboard.
-- See if you can figure out why that particular Fidenza is attracting so much attention
-- and write about it on the dashboard.
SELECT
rc.TOKENID,
AVG(DATEDIFF('DAY', es_prev.BLOCK_TIMESTAMP, es.BLOCK_TIMESTAMP)) AS AVG_Holding_Time,
CONCAT('https://opensea.io/assets/0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270/', rc.TOKENID) AS Opensea_Link,
rc.ResaleCount
FROM
ethereum.nft.ez_nft_sales es
JOIN
ethereum.nft.ez_nft_sales es_prev
ON
es.TOKENID = es_prev.TOKENID
AND es.BLOCK_TIMESTAMP > es_prev.BLOCK_TIMESTAMP
AND es_prev.BLOCK_TIMESTAMP = (
SELECT MAX(BLOCK_TIMESTAMP)
FROM ethereum.nft.ez_nft_sales
WHERE TOKENID = es.TOKENID
AND BLOCK_TIMESTAMP < es.BLOCK_TIMESTAMP
)
JOIN
Run a query to Download Data