These queries will help you to select issues from different instances according to your JQL query
Please pay attention that SQL do not allowed execute all issues from Jira at once. So you need to put Issue ID or JQL query, that selects issues from a particular place (project, user, sprint, board etc)