Writing a query is complex, it easily becomes a pain in the a**.
The first step would be for the user to have access to a set of pre-defined queries (maybe stored in a file), with title and definition.
Another idea could be to remember (in the http session or in a cookie, for instance) the X queries last executed.