jackguyETH Removed
Updated 2022-09-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with tab1 as (
SELECT
date_trunc('week', block_timestamp) as week,
count(DISTINCT tx_hash) as events,
COUNT(DISTINCT DEPOSITOR_ADDRESS) as users,
avg(WITHDRAWN_USD) as avg_withdraw_usd,
sum(WITHDRAWN_USD) as total_withdraw_usd
FROM ethereum.aave.ez_withdraws
WHERE symbol LIKE 'WETH'
GROUP BY 1
)
SELECT
*,
avg(total_withdraw_usd) OVER(ORDER BY week
ROWS BETWEEN 5 PRECEDING AND CURRENT ROW )
as moving_average
FROM tab1
Run a query to Download Data