-
-
Save garethtdavies/dc59372f8100de1a5012a581a3fbedda to your computer and use it in GitHub Desktop.
Get the last 100 MINA transactions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT transactions.amount, | |
transactions.fee, | |
transactions.`from`, | |
transactions.`to`, | |
transactions.`hash`, | |
transactions.id, | |
transactions.isdelegation, | |
transactions.memo, | |
transactions.nonce, | |
transactions.`datetime`, | |
transactions.blockstatehash, | |
transactions.blockheight | |
FROM ( | |
SELECT transactions.amount, | |
transactions.fee, | |
transactions.`from`, | |
transactions.`to`, | |
transactions.`hash`, | |
transactions.id, | |
transactions.isdelegation, | |
transactions.memo, | |
transactions.nonce, | |
transactions.`datetime`, | |
transactions.blockstatehash, | |
transactions.blockheight | |
FROM minaexplorer.archive.transactions | |
WHERE `to` = 'B62qk9WYHu2PBYv4EyEubnVQURcwpiV2ysuYYoMdwi8YTnwZQ7H4bLM' | |
AND canonical = true | |
AND failurereason is Null | |
UNION ALL | |
SELECT transactions.amount, | |
transactions.fee, | |
transactions.`from`, | |
transactions.`to`, | |
transactions.`hash`, | |
transactions.id, | |
transactions.isdelegation, | |
transactions.memo, | |
transactions.nonce, | |
transactions.`datetime`, | |
transactions.blockstatehash, | |
transactions.blockheight | |
FROM minaexplorer.archive.transactions | |
WHERE `from` = 'B62qk9WYHu2PBYv4EyEubnVQURcwpiV2ysuYYoMdwi8YTnwZQ7H4bLM' | |
AND canonical = true | |
AND failurereason is Null | |
) transactions | |
ORDER BY datetime DESC, | |
nonce DESC | |
LIMIT 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment