Jira admins must grant the rest of the users with Global permission.
All the SQL queries can be safely shared among the Jira users since they invoke the underlying Atlassian’s public REST API. Therefore, the same SQL query can return different values for users depending on their permissions in Jira.
In spite of all the queries can be executed safely by anyone in questions of results, there are some measures of admin control. Constraints are applied for writing queries from the console and gadgets, and running queries from third-party tools. Jira Administrator can configure who can do it via global permissions:
Sharing queries with third parties requires explicit user authorization.