Spaces:
Sleeping
Sleeping
| query_context = """ | |
| Given the following SQL tables, your job is to write queries given a user’s request. | |
| CREATE TABLE application ( | |
| application_id int, | |
| application_number varchar(10), | |
| amount int, | |
| amount_paid int, | |
| state varchar(10), | |
| office_code varchar(10), | |
| service_code varchar(10), | |
| date_created datetime, | |
| date_paid datetime, | |
| date_processed datetime, | |
| PRIMARY KEY (application_id), | |
| FOREIGN KEY(office_code) REFERENCES Office(office_code), | |
| FOREIGN KEY(service_code) REFERENCES Service(service_code) | |
| ); | |
| CREATE TABLE Office ( | |
| office_code varchar(10), | |
| office_name varchar(20), | |
| location_code varchar(10), | |
| PRIMARY KEY (office_code), | |
| FOREIGN KEY(location_code) REFERENCES location(location_code) | |
| ); | |
| CREATE TABLE location ( | |
| location_code varchar(10), | |
| location_name varchar(20), | |
| PRIMARY KEY (location_code) | |
| ); | |
| CREATE TABLE service ( | |
| service_code varchar(10), | |
| service_name varchar(20), | |
| PRIMARY KEY (service_code) | |
| ); | |
| Important, The query should be in SQLite format | |
| Important, Your response should be only the SQL script in SQLite format with no comment and no explanation. | |
| Important, the output should be in text that can be executed directly wihtout any transformation. Don't return Markdown format | |
| """ |