mattkstewTF Arbitrum 2
Updated 2023-01-19
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
›
⌄
with tab1 as (
select
date_trunc('day', hour) as date,
avg(price) as WETH_Price
from optimism.core.fact_hourly_token_prices
where symbol like 'WETH'
group by 1
)
, tab2 as (
select
date_trunc('day', block_timestamp) as date,
sum(ETH_Value * WETH_Price) as volume,
avg(Eth_value * WETH_Price) as Average_size,
count(*) as transactions,
count(distinct from_address) as Unique_users
from arbitrum.core.fact_transactions left outer join tab1
on date_trunc('day', block_timestamp) = tab1.date
where block_timestamp > '2022-12-01'
group by 1 )
select
sum(volume),
avg(average_size),
sum(transactions)
from tab2
Run a query to Download Data