I am trying to generate a SQL to run in the backend database to query a list of items in the ticket generator and all associated/generated tickets.
How do I find out table name for ticket generator and the table name(s) for the actual/automatic tickets generated?
which feature do refer to with "Ticket generator"?
Should you already have a SD query showing the data, you can always get the database tables from the query.
See How to find database table and columns names for your Service Desk data
Retrieving data ...