hessDaily Volume (Both)
Updated 2024-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
›
⌄
with blitz as ( select block_timestamp,
'Blitz' as platform,
tx_hash,
trader,
symbol,
case when is_taker = 'true' then amount_usd else 0 end as amount
from blast.blitz.ez_perp_trades
UNION all
select block_timestamp,
'Vertex' as platform,
tx_hash,
trader,
symbol,
case when is_taker = 'true' then amount_usd else 0 end as amount
from arbitrum.vertex.ez_perp_trades
UNION all
select block_timestamp,
'Vertex' as platform,
tx_hash,
trader,
symbol,
case when is_taker = 'true' then amount_usd else 0 end as amount
from arbitrum.vertex.ez_spot_trades
)
select trunc(block_timestamp,'day') as date,
count(DISTINCT trader) as traders,
count(DISTINCT tx_hash) as tx,
sum(amount) as volume,
avg(amount) as avg_volume,
median(amount) as medain_volume,
max(amount) as max_volume,
avg(volume) over (order by date rows between 30 preceding and current row) as avg_30_day_moving,
avg(volume) over (order by date rows between 14 preceding and current row) as avg_14_day_moving,
avg(volume) over (order by date rows between 7 preceding and current row) as avg_7_day_moving
from blitz
QueryRunArchived: QueryRun has been archived