winnie-fsacess 3 (final)
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
›
⌄
with tab1 as (
SELECT
DISTINCT tx_id
FROM solana.core.fact_transfers
WHERE mint LIKE '5MAYDfq5yxtudAhtfyuMBuHZjgAbaS9tbEyEQYAhDS5y'
and tx_to LIKE 'FK1VcVh5PqEUm8U3aEz69DRSNSCjD6cMjzGx3KKbiE8'
), tab2 as (
SELECT
tx_id,
count(DISTINCT tx_to) as to_count
FROM solana.core.fact_transfers
WHERE mint LIKE '5MAYDfq5yxtudAhtfyuMBuHZjgAbaS9tbEyEQYAhDS5y'
and NOT tx_to LIKE 'FK1VcVh5PqEUm8U3aEz69DRSNSCjD6cMjzGx3KKbiE8'
AND tx_id in (SELECT * from tab1)
GROUP BY 1
HAVING to_count = 1
)
SELECT
date_trunc('week', block_timestamp) as week,
count(DISTINCT tx_id) as deposit_events,
count(DISTINCT tx_from) as depositors,
sum(amount) as deposit_fee_volume,
sum(amount) * 50 as deposit_volume
FROM solana.core.fact_transfers
WHERE mint LIKE '5MAYDfq5yxtudAhtfyuMBuHZjgAbaS9tbEyEQYAhDS5y'
and tx_to LIKE 'FK1VcVh5PqEUm8U3aEz69DRSNSCjD6cMjzGx3KKbiE8'
AND tx_id in (SELECT tx_id from tab2)
GROUP BY 1
Run a query to Download Data