greyswansharky_users_collection
Updated 2023-05-12
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
sharx_mints as (
select
address
from
solana.core.dim_labels
where
label = 'sharx by sharky.fi'
),
sharx_buyers as (
select
purchaser,
count(tx_id) as sharx_purchased,
1 as sharx_dummy
from
sharx_mints
left join solana.core.fact_nft_sales on address = mint
group by
purchaser
),
sharky_loans as (
select
tx_id,
block_timestamp,
date_trunc('week', block_timestamp) as week,
signers[0] as borrower,
abs(post_balances[0] - pre_balances[0]) / 1e9 as loan_amount
from
solana.core.fact_transactions
WHERE
BLOCK_TIMESTAMP >= '2022-10-01'
AND BLOCK_TIMESTAMP < CURRENT_DATE
AND ARRAY_CONTAINS(
PARSE_JSON(
'{"pubkey":"SHARKobtfF1bHhxD2eqftjHBdVSCbKo9JtgK71FhELP","signer":false,"source":"transaction","writable":false}'
),
Run a query to Download Data