SandeshPercentage of projects in each bracket
Updated 2022-10-19Copy 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 eth as
(
with bracketed as
(
select
*,
case
when price between 0 and 0.01 then ' 0 - 0.01 ETH'
when price between 0.01 and 0.1 then ' 0.01 - 0.1 ETH'
when price between 0.1 and 1 then ' 0.1 - 1 ETH'
when price between 1 and 10 then ' 1 - 10 ETH'
when price >10 then '10+ ETH'
else 'other'
end as bracket
from ethereum.core.ez_nft_sales
where block_timestamp > current_date - interval ' {{number_of_months}} months'
)
select
'ethereum' as chain,
bracket,
count(tx_hash) as number_of_transactions,
sum(price) as vol,
100* count(distinct nft_address)/(select count(distinct nft_address) from ethereum.core.ez_nft_sales) as percentage_of_projects,
100* count(distinct buyer_address)/(select count(distinct buyer_address) from ethereum.core.ez_nft_sales) as percentage_of_buyers
from bracketed
where currency_symbol in ('WETH','ETH')
group by bracket
order by bracket
),
opti as
(
with bracketed as
(
select
*,
case
Run a query to Download Data