Pine AnalyticsNeptune Metrics copy copy copy copy
Updated 2025-01-23
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 tab1 as (
SELECT
tx.tx_id,
block_timestamp,
pre_bal.index,
pre_bal.value AS pre_token_balance,
pre_token_balance['mint'] as token,
pre_token_balance['owner'] as owner,
pre_token_balance['uiTokenAmount']['amount'] / power(10, 9) as pre_balance
FROM
eclipse.core.fact_transactions tx,
LATERAL FLATTEN(input => tx.PRE_TOKEN_BALANCES) pre_bal
WHERE token like 'FATF66HHhz8Yf2zxMXZXjmzu8NFArwtCJGEsj7rHC8i4'
and SUCCEEDED
and block_timestamp > '2024-01-20'
), tab2 as (
SELECT
tx.tx_id,
block_timestamp,
post_bal.index,
post_bal.value AS post_token_balance,
post_token_balance['mint'] as token,
post_token_balance['owner'] as owner,
post_token_balance['uiTokenAmount']['amount'] / power(10, 9) as post_balance
FROM
eclipse.core.fact_transactions tx,
LATERAL FLATTEN(input => tx.post_TOKEN_BALANCES) post_bal
WHERE token like 'FATF66HHhz8Yf2zxMXZXjmzu8NFArwtCJGEsj7rHC8i4'
and SUCCEEDED
and block_timestamp > '2024-01-20'
)
SELECT
case when usdn_balance < 1 then 'a/ Below 1'
when usdn_balance < 10 then 'b/ 1-10'
QueryRunArchived: QueryRun has been archived