Google Translate
"is there a way to query all open tickets of an organization with an SQL statement?"
Tickets do not have an Organization, so not easily.
You would have to find all users that were in an organization. Then you would have to do a query to see what tickets had those users in an open state.