I recently experimented with using org-babel blocks with AWS Athena queries in them (and evaluating them into :result blocks with C-c C-c) instead of putting the queries into my shell history.
The nice thing about this setup is I can keep notes really easily alongside the queries, and the output is right there in the :results blocks. It's kind of like a jupyter / ipython notebook, but for _any command_.