How to use the SQL Query Generator.
SQL generation needs schema names and the meaning of the desired result. Clarify joins and aggregation before treating a query as ready to run.
Make the workflow fit your task.
Supply the SQL dialect, schema and intended row meaning before writing the query. Define joins, filters and grouping explicitly, then test representative records including duplicates and missing values against the expected result.
- What you provide
- Database schema and desired result.
- What you get
- Read-only query draft with assumptions explained.
See the input and the result.
Illustrative input and output · a teaching example, not a live WebAct run
Example input
Table orders has customer_id and total; find each customer's total spending.
Completed example
SELECT customer_id, SUM(total) AS total_spend FROM orders GROUP BY customer_id;
Load this input into the prompt, then copy it to WebAct to try the task. Your result may differ from the illustration.
Decisions and troubleshooting.
Should a query infer join keys from similar column names?
Confirm the relationship and uniqueness assumptions. A plausible join can multiply rows or connect unrelated records.
Why does the total become larger after adding a join?
Check one-to-many relationships and aggregation order. Inspect row counts and a small known customer before trusting the complete result.
Try it with your own source.
Replace the example with your material in the task prompt. Keep the requirements you need, then copy the task into WebAct.
Customize and copy the task ↑