How can I make queries secret?
The Apache logs show what the Apache Web Server has been asked to do.
It generally knows (nor cares) not a jot about SQL.  Of any flavour.
Please, please, please tell me you're not submitting raw SQL statements to your web application through the URL and/or QueryString and executing them!
Obligatory XKCD Reference: Little Bobby Tables.
This is a huge Security Risk and, if Apache really is logging queries, including Personal Data into its own, largely unsecured, log file then you're heading into very dangerous waters with regards to Data Protection legislation (e.g. GDPR).