KARTODGenopets Staking: Staked $GENE for last 24H
Updated 2023-04-28Copy Reference Fork
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
›
⌄
WITH all_staking_transactions AS (
SELECT
block_timestamp,
tx_id,
pre_token_balances[0]:mint::string AS token,
ROUND(pre_token_balances[0]:uiTokenAmount:uiAmount - inner_instructions[0]:instructions[0]:parsed:info:lamports/pow(10,9), 2) as amount,
CASE
WHEN amount < 1 THEN '0-1 SOL'
WHEN amount >= 1 AND amount < 10 THEN '1-10 SOL'
WHEN amount >= 10 AND amount < 100 THEN '10-100 SOL'
WHEN amount >= 100 THEN '100 and more SOL'
END AS status
FROM
solana.core.fact_transactions
WHERE
block_timestamp::date >= CURRENT_DATE() - INTERVAL'24 hour'
AND
inner_instructions[0]:instructions[0]:parsed:info:owner::string = 'StaKe9nb7aUjXpjpZ45o6uJBsZxj2BWCDBtjk8LCg2v'
AND
pre_token_balances[0]:mint::string = 'GENEtH5amGSi8kHAtQoezp1XEXwZJ8vcuePYnXdKrMYz'
AND
succeeded = 'TRUE'
HAVING ROUND(pre_token_balances[0]:uiTokenAmount:uiAmount - inner_instructions[0]:instructions[0]:parsed:info:lamports/pow(10,9), 2) IS NOT NULL
)
SELECT
*
FROM
all_staking_transactions
ORDER BY block_timestamp ASC
Run a query to Download Data