Salehct
Updated 2023-08-30
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
›
⌄
with lst_price as (
select
hour::date as day
,avg(price) as avg_price
from ethereum.core.fact_hourly_token_prices
where hour::date>='2023-08-01'
and symbol ='frxETH'
group by 1
order by 1 desc
limit 30
)
select
date_trunc(day,block_timestamp)::date as date
,count(DISTINCT tx_hash) as tx_count
,count(DISTINCT sender) as swaper
,avg(amount_in_usd) as avg_swap_usd
,avg(avg_swap_usd) over (ORDER BY date rows BETWEEN 7 PRECEDING AND CURRENT ROW) as avg_7_Days_volume
from ethereum.core.ez_dex_swaps
join ethereum.core.dim_labels on address = CONTRACT_ADDRESS
where block_timestamp::date>='2023-08-01'
and label in('curve')
and amount_in_usd>0
group by 1
Run a query to Download Data