boomer77Sales n Volume AB
Updated 2021-09-07
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with sales as (select block_timestamp,
token_id,
price_usd,
tx_id
from ethereum.nft_events
where event_type = 'sale' and contract_address in ('0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270', '0x059edd72cd353df5106d2b9cc5ab83a52287ac3a')
),
series as (select
token_metadata:curation_status::string as AB_Series,
token_id
from ethereum.nft_metadata
where contract_address in ('0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270', '0x059edd72cd353df5106d2b9cc5ab83a52287ac3a')
group by 1,2)
select date_trunc('month', a.block_timestamp) as block_month, b.AB_series, sum(a.price_usd) as Volume, count(distinct tx_id) as Sales, avg(a.price_usd) as Average_Price
from sales a
join series b on a.token_id = b.token_id
group by 1,2
Run a query to Download Data