FYI.
Instead of figuring out how to find the last unsaved executed query in SQL QA, I started using Teradata SQL Assistant tool which can be used against most of the databases and stores all the queries in a history file. The cool thing about this tool is that history file is displayed right in this analyzer in a tabular format and you can just select and also search on whatever previous queries you might have executed.
Thanks to all for your suggestions.