brian-terraopensea sale summary - collections
Updated 2021-09-01Copy Reference Fork
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 ABsales AS (
select DISTINCT
m.token_name,
e.token_id,
m.token_metadata:curation_status::string AS collection,
e.price,
e.platform_fee,
e.creator_fee
from ethereum.nft_events E, ethereum.nft_metadata M
where e.block_timestamp between '2021-07-01' and '2021-08-01'
AND e.event_platform = 'art_blocks'
AND e.event_type = 'sale'
AND e.token_id = m.token_id
),
OSsales AS (
select DISTINCT
m.token_name,
e.token_id,
m.token_metadata:curation_status::string AS collection,
e.price,
e.platform_fee,
e.creator_fee
from ethereum.nft_events E, ethereum.nft_metadata M, ABsales AB
where e.block_timestamp > '2021-08-01'
AND e.event_platform = 'opensea'
AND e.event_type = 'sale'
AND e.token_id = m.token_id
AND ab.token_id = e.token_id
),
Osum AS (
select collection,
count(distinct o.token_name) AS TotalSold,
round(avg(o.price),3) AS AvgPriceETH,
sum(o.price) AS totalETHspent
from ossales o
Run a query to Download Data