i_danLending
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
30
31
32
33
34
35
36
›
⌄
WITH weekly AS (
SELECT
date_trunc('week', block_timestamp) AS week
, platform
, token_symbol AS token
, '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
Group by 1, 2, 3
UNION ALL
SELECT
date_trunc('week', block_timestamp) AS week
, platform
, token_symbol AS token
, '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
Group by 1, 2, 3
UNION ALL
SELECT
date_trunc('week', block_timestamp) AS week
, platform
, token_symbol AS token
, 'borrow' AS type
, SUM(amount_usd) AS volume
, COUNT(DISTINCT origin_from_address) AS users
, COUNT(tx_hash) AS transactions
from base.defi.ez_lending_borrows
QueryRunArchived: QueryRun has been archived