MLDZMNETH.net.swaps copy
Updated 2023-04-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
32
33
34
35
36
›
⌄
-- forked from ETH.net.swaps @ https://flipsidecrypto.xyz/edit/queries/5c106086-c52a-4bf6-938f-6e8e9c087abe
with tb1 as(SELECT
*
from ethereum.core.dim_labels
where label_type='cex'
),
tb4 as (select
HOUR::date as day,
avg(price) as ETH_price
from ethereum.core.fact_hourly_token_prices
where hour>= '2023-04-01'
and symbol in ('WETH')
group by 1),
tb2 as (select
BLOCK_TIMESTAMP::date as day,
count(distinct tx_hash) as no_transfer,
count(distinct SENDER) as no_sender,
sum(AMOUNT_out) as total_volume,
avg(AMOUNT_out) as avg_volume,
sum(total_volume) over (order by day) as cum_volume
from ethereum.core.ez_dex_swaps
where BLOCK_TIMESTAMP>='2023-04-01'
and SYMBOL_OUT='WETH'
group by 1),
tb3 as (select
BLOCK_TIMESTAMP::date as day,
count(distinct tx_hash) as no_transfer1,
count(distinct SENDER) as no_sender1,
sum(AMOUNT_IN) as total_volume1,
avg(AMOUNT_IN) as avg_volume1,
sum(total_volume1) over (order by day) as cum_volume1
from ethereum.core.ez_dex_swaps
Run a query to Download Data