IBC_insiderQ 2-2
Updated 2023-05-03
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 t1 as
(
select avg(PRICE) as aprice,
date_trunc(day,HOUR) as datee
from
crosschain.core.ez_hourly_prices
where datee>current_date-40 and
SYMBOL='WETH'
group by 2
)
,
t2 as
(select
date_trunc('day',BLOCK_TIMESTAMP) as date, NFT_ADDRESS ,PRICE
from
ethereum.core.ez_nft_sales
where
BLOCK_TIMESTAMP>current_date-40 and (CURRENCY_SYMBOL='ETH' or CURRENCY_ADDRESS='ETH')
)
,
t3 as
(select
sum(price*aPRICE) as volume ,
NFT_ADDRESS
from
t1 a inner join t2 b
on a.datee=b.date
group by 2
order by 1 desc
limit 5)
,
t3 as
Run a query to Download Data