anomoneLargest Deposit SOL
Updated 2022-04-28
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 single_row as (
SELECT * FROM solana.events
WHERE INSTRUCTION:programId = '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8'
--AND tx_id = 'KR6ojGVW26oax246nKwMjfd6qigp2mBMpUFwhEtCtUAfCKGBFVr9zwAdeTzWnPLvrJQHMpxSK7SSSCap2SFnVSe'
--AND INNER_INSTRUCTION:instructions[2]:parsed:type = 'transfer'
--AND array_size(inner_instruction:instructions) > 4 -- To filter only for secondary sales
AND ARRAY_CONTAINS( 'Do8Af6yzWsMvvbGifzPDEutVYRv8j1qhaM6cNVg8YXaH'::variant , INSTRUCTION:accounts )
AND INDEX = 0
AND succeeded = 'TRUE'
AND date(block_timestamp) >= '2022-02-28'
),
pre_balances as (
SELECT
BLOCK_TIMESTAMP,
TX_ID,
value:mint as token_address,
value:owner as owner, -- if accountIndex is 1 then sender; 2 then reciepient
--value:accountIndex as accountIndex,
value:uiTokenAmount:uiAmount as pre_amount
from single_row, lateral flatten(input => pretokenbalances)
WHERE OWNER = 'Do8Af6yzWsMvvbGifzPDEutVYRv8j1qhaM6cNVg8YXaH'
),
post_balances as (
SELECT
BLOCK_TIMESTAMP,
TX_ID,
value:mint as token_address,
value:owner as owner, -- if accountIndex is 1 then sender; 2 then reciepient
--value:accountIndex as accountIndex,
value:uiTokenAmount:uiAmount as post_amount
from single_row, lateral flatten(input => POSTTOKENBALANCES)
WHERE OWNER = 'Do8Af6yzWsMvvbGifzPDEutVYRv8j1qhaM6cNVg8YXaH'
)
Run a query to Download Data