<a href="https://vborg.vbsupport.ru/showthread.php?t=96199" target="_blank">Custom Queries with parameters</a> this was written for 3.5.0 RC3, but it might still work on later versions or it will give you an idea how this can be done.
Edit: Just checked the 3.6.5 code of query.php, and all automatic queries are still hard-coded in the file and no hooks exist. So you would either need to do something like my modification or perform a source edit.
|