adds a query to /misc/queries.sql