Afonso_Diazgrouping txns
Updated 2024-10-25
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
pricet as (
select
hour::date as dt,
avg(price) as token_price_usd
from
aptos.price.ez_prices_hourly
where
symbol = 'APT'
group by 1
),
sales as (
select
tx_hash,
block_timestamp,
seller_address,
buyer_address,
project_name,
nft_address,
nvl(total_price_usd, total_price * token_price_usd) as price_usd,
nvl(platform_fee_usd, platform_fee * token_price_usd) as platform_fee_usd
from
aptos.nft.ez_nft_sales
left join
pricet on block_timestamp::date = dt
where
platform_name = 'Okx'
)
select
case
when price_usd < 10 then 'a. Less than 10 $'
when price_usd <= 50 then 'b. 10 - 50 $'
when price_usd <= 100 then 'c. 50 - 100 $'
QueryRunArchived: QueryRun has been archived