tkvresearcheth action vs gas
Updated 2024-11-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
29
30
31
32
33
34
35
36
›
⌄
with swap_volume as (
select date_trunc('day', block_timestamp) as day, sum(amount_in_usd) as swap_volume, count(*) as swap_txn
from ethereum.defi.ez_dex_swaps
where block_timestamp >= current_timestamp() - INTERVAL '3 month'
group by 1
)
, gas_price_swap as (
select
date_trunc('day', block_timestamp) as day,
avg(GAS_PRICE) as gas_price_swap
from ethereum.core.fact_transactions
where block_timestamp >= current_timestamp() - INTERVAL '3 month'
and tx_hash IN (select tx_hash from ethereum.defi.ez_dex_swaps where block_timestamp >= current_timestamp() - INTERVAL '3 month' )
group by 1
)
, bridge_activity as(
select date_trunc('day', block_timestamp) as day, sum(amount_usd) as bridge_volume, count(*) as bridge_txn
from ethereum.defi.ez_bridge_activity
where block_timestamp >= current_timestamp() - INTERVAL '3 month'
group by 1
)
, gas_price_bridge as (
select
date_trunc('day', block_timestamp) as day,
avg(GAS_PRICE) as gas_price_bridge
from ethereum.core.fact_transactions
where block_timestamp >= current_timestamp() - INTERVAL '3 month'
and tx_hash IN (select tx_hash from ethereum.defi.ez_bridge_activity where block_timestamp >= current_timestamp() - INTERVAL '3 month' )
group by 1
QueryRunArchived: QueryRun has been archived