mboveiriOP NFT 1
Updated 2022-10-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
27
28
29
30
›
⌄
with txs as (
select
*,
case
when price < 0.1 then 'Less Than 0.1 ETH'
when price >= 0.1 and price <= 0.5 then '0.1-0.5 ETH'
when price > 0.5 and price <= 1 then '0.5-1 ETH'
when price > 1 and price <= 3 then '1-3 ETH'
when price > 3 and price <= 5 then '3-5 ETH'
when price > 5 and price <= 10 then '5-10 ETH'
when price > 10 and price <= 20 then '10-20 ETH'
when price > 20 then 'Above 20 ETH'
end as price_amount,
case
when address_name is null then nft_address
when address_name = 'optimism: general contract' then nft_address
else address_name end as collection
from optimism.core.ez_nft_sales a left join optimism.core.dim_labels b on a.nft_address = b.address
where CURRENCY_address in ('ETH','0x4200000000000000000000000000000000000006')
)
select
date_trunc('week',block_timestamp::date) as date,
price_amount,
sum(price) as vol,
count(tx_hash) as cnt
from txs
group by 1,2
having vol >= 1
Run a query to Download Data