home/coding/sql-structured-cot

Sql Structured Cot

GPTClaudeDeepSeek··1,151 copies·updated 2026-07-14
sql-structured-cot.prompt
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