i_danLending Deposit and Withdrawal
Updated 2024-11-08
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
›
⌄
WITH weekly AS (
SELECT
'deposit' AS type
, SUM(amount_usd) AS volume
, COUNT(DISTINCT origin_from_address) AS users
, COUNT(tx_hash) AS transactions
from base.defi.ez_lending_deposits
UNION ALL
SELECT
'withdraw' AS type
, SUM(amount_usd) AS volume
, COUNT(DISTINCT origin_from_address) AS users
, COUNT(tx_hash) AS transactions
from base.defi.ez_lending_withdraws
)
SELECT
type
, SUM(volume) AS volume
, SUM(users) AS users
, SUM(transactions) AS transactions
FROM weekly
GROUP BY 1
ORDER BY 2 DESC
QueryRunArchived: QueryRun has been archived