Query recent token transfers for a specific addressThis query returns the most recent token transfers (both incoming and outgoing) for a specified address:
Copy
Ask AI
SELECT block_time, action, CASE WHEN from_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' THEN 'Outgoing' WHEN to_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' THEN 'Incoming' END AS direction, amount, amount_usd, token_mint_address, token_versionFROM tokens_solana.transfersWHERE (from_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' OR to_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ') AND block_time > now() - interval '30' dayORDER BY block_time DESCLIMIT 100