ArioUser Behavior (redux) - 1
Updated 2022-10-26Copy Reference Fork
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 ETH_Data as (
SELECT
date_trunc('day', block_timestamp) as date,
count(distinct tx_hash) as "ETH - # TXs",
sum("ETH - # TXs") over (order by date) as "ETH - Total # TXs",
count(distinct FROM_ADDRESS) as "ETH - # Users",
sum("ETH - # Users") over(order by date) as "ETH - Total # Users",
sum(tx_fee) as "ETH - Fee Volume ($ETH)",
avg(tx_fee) as "ETH - AVG Tx Fee",
sum("ETH - Fee Volume ($ETH)") over(order by date) as "ETH - Cumulative Fee Volume"
from ethereum.core.fact_transactions
where 1=1
and STATUS = 'SUCCESS'
and TX_FEE is not null
and block_timestamp >= CURRENT_DATE - 30
group by 1
),
OP_Data as (
SELECT
date_trunc('day', block_timestamp) as date,
count(distinct tx_hash) as "OP - # TXs",
sum("OP - # TXs") over (order by date) as "OP - Total # TXs",
count(distinct FROM_ADDRESS) as "OP - # Users",
sum("OP - # Users") over(order by date) as "OP - Total # Users",
sum(tx_fee) as "OP - Fee Volume ($ETH)",
avg(tx_fee) as "OP - AVG Tx Fee",
sum("OP - Fee Volume ($ETH)") over(order by date) as "OP - Cumulative Fee Volume"
from optimism.core.fact_transactions
where 1=1
and STATUS = 'SUCCESS'
and TX_FEE is not null
and block_timestamp >= CURRENT_DATE - 30
group by 1
)
select *,
Run a query to Download Data