Macro to edit queries

Hello!

Is it possible to change database queries with a macro? And if yes, how?

I got this task (having no previous experience with LibreOffice or any other office programming, or even using, whatsoever): I have to change a query in a database, which is ok, since I main as web programmer (php,sql,c#,java,…), but the problem is, the database is ‘distributed’ to many users and I can’t expect all of them to open queries in editor and mess with the SQL sentences there. My idea is to distribute a macro for them to doubleclick and get things done.

I know I should use search, but if someone of you guys knows the answer out of your head, it would save me hours of forum browsing. I repeat, I have no experience with *Office.

Cheers!
p.