john-adamUntitled Query
Updated 2022-10-26
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
SELECT block_timestamp::date as date, 'Ethereum' as chains,
count(DISTINCT from_address) AS users,
count(DISTINCT to_address ) AS app,
count(distinct tx_hash) AS tx ,
sum(tx_fee*price) AS tx_fee_usd,
avg(tx_fee*price) AS avg_tx_fee_usd
FROM ethereum.core.fact_transactions as tb1
join (
select hour::date as date, avg(price) as price
from ethereum.core.fact_hourly_token_prices
where symbol = 'WETH'
group by 1
) as tb2 on tb1.block_timestamp::date = tb2.date
where block_timestamp::date>= current_date-90
and block_timestamp::date <current_date
GROUP BY 1,2
Run a query to Download Data