When you use the SQL Query Template, you can input the data you want to extract and generate a prompt-driven example that produces a valid SQL query to retrieve that data.
To try generating SQL based on your internal DB structure, modify the relevant sections of the prompt and run a test.