mamad-5XN3k3Untitled Query
Updated 2023-03-03
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 borrows as (
select block_timestamp::Date as date,
count (Distinct tx_hash) as txs,
count (distinct BORROWER) as users
--sum (AMOUNT_LOANED) as Borrowed_Volume,
--avg (AMOUNT_LOANED) as Average_Volume
from ethereum.maker.ez_flash_loans
where block_timestamp >= '2023-01-01'
and symbol = 'BUSD'
and TX_STATUS='SUCCESS'
group by 1),
deposits as (
select
block_timestamp::Date as date,
count (Distinct tx_hash) as txs,
count (distinct depositor) as users,
sum (AMOUNT_DEPOSITED) as Deposited_Volume,
avg (AMOUNT_DEPOSITED) as Average_Volume
from ethereum.maker.ez_deposits
where block_timestamp >= '2023-01-01'
and symbol = 'BUSD'
and TX_STATUS='SUCCESS'
group by 1),
repayments as (
select
block_timestamp::Date as date,
count (Distinct tx_hash) as txs,
count (distinct payer) as users,
sum (AMOUNT_PAID) as Repayed_Volume,
avg (AMOUNT_PAID) as Average_Volume
from ethereum.maker.ez_repayments
where block_timestamp >= '2023-01-01'
and symbol = 'BUSD'
and TX_STATUS='SUCCESS'
Run a query to Download Data