SQL errors
Occasionally STYD cannot build or run a valid query for a question. This usually points to a gap in understanding, a change in the data, or missing access.
Common causes
AI Guide does not fully understand the schema yet.
A table or column was renamed or removed.
The read-only database user is missing a needed permission.
The question implies logic that the data does not support.
STYD uses safety layers to keep queries read-only, but your database permissions remain the strongest boundary. Keep using a least-privilege, read-only database user.
What to check
Run the AI Guide analysis again if your schema changed. It costs prompts (about 1 for every 500 columns, at least 1) and the price is shown before you confirm.
Confirm the table and column still exist in the database.
Check that the read-only user can read what the question needs.
Simplify the question and build back up step by step.
Open the technical details (the SQL) and use the feedback buttons.
If the same question keeps failing after a refresh and a simpler retry, contact STYD so it can be looked into.