|
@@ -0,0 +1,42 @@
|
|
|
+WITH
|
|
|
+ transfers AS (
|
|
|
+ SELECT
|
|
|
+ block_time AS time,
|
|
|
+ amount AS amount,
|
|
|
+ from_owner AS from_owner,
|
|
|
+ to_owner AS to_owner,
|
|
|
+ from_token_account AS from_token_account,
|
|
|
+ to_token_account AS to_token_account,
|
|
|
+ token_mint_address AS token_address,
|
|
|
+ tx_id as transaction_id
|
|
|
+ FROM
|
|
|
+ tokens_solana.transfers
|
|
|
+ WHERE
|
|
|
+ block_date > (TIMESTAMP '2024-09-01 00:00:00 +08:00')
|
|
|
+ AND token_address = '4GULMPKBJLruChBZWksZzukAg1AjSCmCTMn9ny2Xpump'
|
|
|
+ AND action = 'transfer'
|
|
|
+ )
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+SELECT
|
|
|
+ time,
|
|
|
+ amount / POWER(10, tk.decimals) as amount,
|
|
|
+ tk.symbol,
|
|
|
+ from_owner,
|
|
|
+ to_owner,
|
|
|
+ from_token_account,
|
|
|
+ to_token_account,
|
|
|
+ transaction_id,
|
|
|
+ token_address
|
|
|
+FROM
|
|
|
+ transfers
|
|
|
+ LEFT JOIN tokens_solana.fungible tk ON tk.token_mint_address = transfers.token_address
|
|
|
+WHERE
|
|
|
+
|
|
|
+ (
|
|
|
+ to_owner = 'ELeMLdqSaFF31SappKg4wrqBKmknguJrtAXRT8xbpWaP'
|
|
|
+ OR from_owner = 'ELeMLdqSaFF31SappKg4wrqBKmknguJrtAXRT8xbpWaP'
|
|
|
+ )
|
|
|
+ORDER BY
|
|
|
+ time ASC
|