SQL_Generation / example_queries.py
daljeetsingh's picture
c
cda2117
small_query=""" Tables:
CREATE TABLE table_name_11 (date VARCHAR, away_team VARCHAR)
Question:
On what Date did the Away team essendon play?
Answer:"""
long_query="""Tables:
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20),
LAST_NAME varchar(25), EMAIL varchar(25),
PHONE_NUMBER varchar(20), HIRE_DATE date,
JOB_ID varchar(10), SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10), JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12), CITY varchar(30),
STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0), START_DATE date,
END_DATE date, JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0), REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0)
)
Question:
For those employees who did not have any job in the past, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id, and list from low to high by the JOB_ID please.
Answer:
"""