eslamis-darkatNFT eth vs solana 3
Updated 2022-09-24
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
›
⌄
with price as (select date_trunc('day', hour) as dt_price, avg(price) as sol_price
from ethereum.core.fact_hourly_token_prices
where token_address = '0xd31a59c85ae9d8edefec411d448f90841571b89c'
group by dt_price),
sol_sales_vol as (select purchaser, sum(sales_amount * sol_price) as sales_volume
from solana.core.fact_nft_sales s
inner join price p on
date_trunc('day', s.block_timestamp) = p.dt_price
where block_timestamp::date >= '2022-01-01'
group by 1)
select case
when sales_volume > 0 and sales_volume < 10 then '1. Shrimp 0-10'
when sales_volume >= 10 and sales_volume < 100 then '2. Crab 10-100'
when sales_volume >= 100 and sales_volume < 500 then '3. Octopus 100-500'
when sales_volume >= 500 and sales_volume < 1000 then '4. Fish 500-1k'
when sales_volume >= 1000 and sales_volume < 10000 then '5. Dolphin 1k-10k'
when sales_volume >= 10000 and sales_volume < 100000 then '6. Shark 10k-100k'
when sales_volume >= 100000 then '7. Whale >100k' end as tier,
count(distinct purchaser) as number_of_buyers
from sol_sales_vol
where tier is not null
group by 1
Run a query to Download Data