phuDai Loan from May 2021 to Apr 2022
Updated 2022-05-16
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
›
⌄
-- genesis address = '0x0000000000000000000000000000000000000000'
-- contract address = '0x6b175474e89094c44da98b954eedeac495271d0f'
select
block_timestamp:: date date,
case
when date BETWEEN '2021-05-01' and '2021-06-10' then 'Raise'
when date BETWEEN '2021-06-11' and '2021-08-05' then 'Reduce'
when date BETWEEN '2021-08-06' and '2022-01-24' then 'Raise'
when date BETWEEN '2022-01-25' and '2022-03-13' then 'Reduce'
when date BETWEEN '2022-03-14' and '2022-04-10' then 'Raise'
else 'Reduce'
end grp,
sum(amount_usd) loan_amount,
count(distinct(tx_id)) loan_volume
from
ethereum.udm_events
where
symbol = 'DAI'
and from_address = '0x0000000000000000000000000000000000000000'
and contract_address = '0x6b175474e89094c44da98b954eedeac495271d0f'
and origin_function_name = 'execute'
and (
date between '2021-05-01' and '2022-04-30'
)
group by
1
Run a query to Download Data