Update prompt.md

This commit is contained in:
Rishabh Srivastava 2023-10-04 22:25:31 +08:00 committed by GitHub
parent 79183a587d
commit 36d77958a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 11 deletions

View File

@ -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