greyswanforeclosure analysis
Updated 2023-10-27
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 foreclosures as (
select
block_timestamp,
tx_id,
signers [0] as lender
from
solana.core.fact_events
where
program_id = 'SHARKobtfF1bHhxD2eqftjHBdVSCbKo9JtgK71FhELP'
and block_timestamp > CURRENT_DATE - 60
and succeeded = 'true'
and instruction:data = 'PsMLKfYdn1u'
),
mints as (
select
mint,
lender,
a.block_timestamp as foreclose_ts
from
foreclosures a
left join solana.core.fact_transfers b on a.tx_id = b.tx_id
and lender = TX_TO
where
b.block_timestamp > CURRENT_DATE - 60
)
SELECT
block_timestamp,
foreclose_ts,
datediff('day',foreclose_ts, block_timestamp) as sold_in,
a.mint,
lender,
label as collection
from
mints a
left join solana.nft.fact_nft_sales b on a.mint = b.mint
Run a query to Download Data