fb3ce38c-7bfe-475c-bca8-3f1e44ae80a6Untitled Query
Updated 2022-09-12
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
›
⌄
WITH
sales AS (
SELECT
events.tx_hash,
events.origin_to_address AS marketplace,
events.event_inputs:from AS seller,
events.event_inputs:to AS buyer,
events.event_inputs:tokenId AS token,
events.contract_address AS collection,
transactions.matic_value AS price
FROM
polygon.core.fact_event_logs events
JOIN
polygon.core.fact_transactions transactions
ON
events.tx_hash = transactions.tx_hash
WHERE
events.event_inputs:to ='0xEC5F4eA1F761F507a616E4C6226084AB2F32D218'
)
SELECT
COUNT(DISTINCT tx_hash) AS txn,
COUNT(DISTINCT marketplace) AS marketplaces,
COUNT(DISTINCT seller) AS sellers,
COUNT(DISTINCT buyer) AS buyers,
COUNT(DISTINCT token) AS nfts,
COUNT(DISTINCT collection) AS collections,
SUM(price) AS volume,
(volume / nfts) AS price
FROM
sales
Run a query to Download Data