Update prompt.md
This commit is contained in:
parent
79183a587d
commit
36d77958a7
18
prompt.md
18
prompt.md
|
@ -1,15 +1,11 @@
|
|||
### Instructions:
|
||||
Your task is convert a question into a SQL query, given a Postgres database schema.
|
||||
Adhere to these rules:
|
||||
- **Deliberately go through the question and database schema word by word** to appropriately answer the question
|
||||
- **Use Table Aliases** to prevent ambiguity. For example, `SELECT table1.col1, table2.col1 FROM table1 JOIN table2 ON table1.id = table2.id`.
|
||||
- When creating a ratio, always cast the numerator as float
|
||||
### Task
|
||||
Generate a SQL query to answer the following question:
|
||||
`{user_question}`
|
||||
|
||||
### Input:
|
||||
Generate a SQL query that answers the question `{user_question}`.
|
||||
This query will run on a database whose schema is represented in this string:
|
||||
### Database Schema
|
||||
The query will run on a database with the following schema:
|
||||
{table_metadata_string}
|
||||
|
||||
### Response:
|
||||
Based on your instructions, here is the SQL query I have generated to answer the question `{user_question}`:
|
||||
### SQL
|
||||
Given the database schema, here is the SQL query that answers `{user_question}`:
|
||||
```sql
|
||||
|
|
Loading…
Reference in New Issue