Eman-RazActivity on Silo Finance
Updated 2024-01-15
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
›
⌄
with deposit as (select date_trunc('{{Time_Frame}}',block_timestamp) as "Date", count(distinct tx_hash) as "TXs Count",
count(distinct depositor) as "User Count", sum(amount_usd) as "Volume (USD)", 'Deposit' as "Action"
from arbitrum.defi.ez_lending_deposits
where platform='Silo' and event_name='Deposit'
group by 1),
withdraw as (select date_trunc('{{Time_Frame}}',block_timestamp) as "Date",
count(distinct tx_hash) as "TXs Count",
count(distinct DEPOSITOR) as "User Count", -sum(amount_usd) as "Volume (USD)", 'Withdraw' as "Action"
from arbitrum.defi.ez_lending_withdraws
where platform='Silo' and event_name='Withdraw'
group by 1),
borrow as (select date_trunc('{{Time_Frame}}',block_timestamp) as "Date",
count(distinct tx_hash) as "TXs Count",
count(distinct borrower) as "User Count", -sum(amount_usd) as "Volume (USD)", 'Borrow' as "Action"
from arbitrum.defi.ez_lending_borrows
where platform='Silo' and event_name='Borrow'
group by 1),
repay as (select date_trunc('{{Time_Frame}}',block_timestamp) as "Date",
count(distinct tx_hash) as "TXs Count",
count(distinct BORROWER) as "User Count", sum(amount_usd) as "Volume (USD)", 'Repay' as "Action"
from arbitrum.defi.ez_lending_repayments
where platform='Silo' and event_name='Repay'
group by 1
order by 1)
select * from deposit union all
select * from withdraw union all
select * from borrow union all
select * from repay
QueryRunArchived: QueryRun has been archived