Ollama Command Text
Ollama Command Text
Your task is to 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
- When choosing a property for WHERE or JOIN statements, do not use primary
keys and/or IDs.
### Input:
Using the schema represented below:
CREATE SCHEMA siconv;
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS postgis_raster WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public;
Generate a SQL query that answers the question 'show me construction sites in
Fortaleza which started in 01/01/2020'.
### Response:
Based on your instructions, here is the SQL query I have generated to answer
the question:
sql