You would likely have to figure out the table relations and make your own query to export everything.
You might find this helpful. https://docs.osticket.com/en/latest/Developer%20Documentation/Database%20ERDs.html