DiamondFunded Loan copy
Updated 2024-08-05
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
›
⌄
-- forked from Ario / Funded Loan @ https://flipsidecrypto.xyz/Ario/q/UJKDN5DH-30W/funded-loan
-- Funding Loans
select
date_trunc(week, BLOCK_TIMESTAMP) as week,
count(distinct EVENT_DATA:borrower) as "# Borrower",
sum("# Borrower") over(order by week) as "Cum # Borrower",
count(distinct EVENT_DATA:lender) as "# Lender",
sum("# Lender") over(order by week) as "Cum # Lender",
count(DISTINCT TX_ID) as "# Loan Count",
sum("# Loan Count") over(order by week) as "Cum. Loan Count",
sum(EVENT_DATA:repaymentAmount) as "Loan Volume",
sum("Loan Volume") over(order by week) as "Cum. Loan Volume"
select *
from
flow.core.fact_events
where
EVENT_CONTRACT = 'A.5c57f79c6694797f.Flowty'
and EVENT_TYPE = 'FundingAvailable'
and TX_SUCCEEDED = 'true'
group by
1
order by 1 desc
QueryRunArchived: QueryRun has been archived