mz0111Aave 6
Updated 2023-03-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with tab1 as (SELECT
date_trunc('day', hour) as date1,
avg(price) as usd_price
FROM ethereum.core.fact_hourly_token_prices
WHERE symbol = 'WETH'
GROUP BY 1 )
SELECT
DISTINCT from_address as users,
sum(tx_fee) as ETH_FEE,
sum(tx_fee * usd_price) as USD_FEE
FROM ethereum.core.fact_transactions
join tab1 on date1 = block_timestamp:: date
where to_address = '0xec568fffba86c094cf06b22134b23074dfe2252c'
AND block_timestamp >= current_date - 90
and STATUS = 'SUCCESS'
GROUP BY 1
order by 2 DESC
limit 10
Run a query to Download Data