zakkisyedtotals
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
›
⌄
WITH tx AS (
SELECT
count(*) as tx_count,
count(distinct(from_address)) as users,
sum(tx_fee) as total_fee_eth,
avg(gas_price) as avg_gwei
FROM
ethereum.core.fact_transactions
WHERE
to_address = lower('0xb48Eb8368c9C6e9b0734de1Ef4ceB9f484B80b9C')
),
prices AS (
SELECT
avg(price) as avg_price_usd
FROM
crosschain.core.ez_hourly_prices
WHERE
symbol = 'weth'
)
SELECT
tx.tx_count,
tx.users,
tx.total_fee_eth,
tx.total_fee_eth * prices.avg_price_usd as total_fee_usd,
tx.avg_gwei,
(tx.total_fee_eth * prices.avg_price_usd) / tx.tx_count as avg_tx_fee_usd
FROM
tx, prices
Run a query to Download Data