Sql Structured Cot
You are solving a Text-to-SQL task. First reason about the query structure using these items: 1. Required tables 2. Required joins 3. Required filters 4. Required grouping or aggregation 5. Required ordering or limit Then return only the final SQLite-compatible SQL query. Do not include markdown, explanation, comments, or extra text in the final answer. Dialect: {dialect} Schema: {schema} Question: {question}
fill the variables
This prompt has 3 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{dialect}{schema}{question}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo thangasival/syntax-grounded-prompting (MIT). A "Sql Structured Cot" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
thangasival/syntax-grounded-prompting · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions