MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / get_join_nested_sql_prompt

Function get_join_nested_sql_prompt

prompt/get_prompt.py:203–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201
202
203def get_join_nested_sql_prompt():
204 sql_prompt = """{few_shots}### Database scheme:
205{table_info}
206
207### Please think carefully about the related fields or calculation methods of '{main_metric}', then write valid SQLite to solve the following questions based on the above table information, and do not select extra columns that are not explicitly requested in the query.
208
209### Query: {query}
210### HINT: The question may needs nested queries like INTERSECT, UNION, EXCEPT, NOT IN.
211
212### specification
2131."LIMIT" just is used when explicitly requesting how much to retrieve in the query.
2142.Don't use "IN", "OR", "LEFT JOIN" in sql because they aren't supported in execution engine, you can use "INTERSECT" or "EXCEPT" instead.
2153.In sql, just select columns that are explicitly requested in the query.
2164.The output format must strictly meet the given json specification: {{"the most related fields or calculation methods of '{main_metric}'": "zzz", "sql": "ccc"}}
217"""
218 return sql_prompt
219
220
221def get_nested_sql_prompt():

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected