bachiaave fee metrics-deposits
Updated 2021-09-30
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with fees as(
SELECT Date_trunc(day, block_timestamp) AS date,
Sum(fee_usd) AS "Total Fee -USD",
Avg(fee_usd) AS "Average fee -USD",
Sum(tx_fee) AS "Transaction fees",
tx_id
FROM ethereum.transactions
WHERE tx_id IN (SELECT tx_id
FROM aave.deposits
WHERE block_timestamp > Dateadd(month, -6, Getdate()))
GROUP BY tx_id,
date
),
deposits as (
SELECT tx_id, aave_version
FROM aave.deposits
WHERE block_timestamp > Dateadd(month, -6, Getdate())
)
select * from fees join deposits where fees.tx_id =deposits.tx_id ORDER BY fees.date DESC
Run a query to Download Data