instruction
stringlengths
8
460
input
stringlengths
37
7.14k
output
stringlengths
9
2.37k
text
stringlengths
302
7.71k
What was the attendance of the game on December 13, 1970?
CREATE TABLE table_name_34 ( attendance VARCHAR, date VARCHAR, week VARCHAR )
SELECT COUNT(attendance) FROM table_name_34 WHERE date = "december 13, 1970" AND week > 13
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance of the game on December 13, 1970? ### Input: CREATE TABLE table_name_34 ( attendance VARCHAR, date VARCHAR, week VARCHAR ) ### Response: SELECT COUNT(attendance) FROM table_name_34 WHERE date = "december 13, 1970" AND week > 13
Have I completed any hardware courses yet ?
CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE area ( course_id int, area varchar )
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN area ON student_record.course_id = area.course_id WHERE area.area LIKE '%hardware%' AND student_record.student_id = 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Have I completed any hardware courses yet ? ### Input: CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE area ( course_id int, area varchar ) ### Response: SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN area ON student_record.course_id = area.course_id WHERE area.area LIKE '%hardware%' AND student_record.student_id = 1
What is the name of the team with a rank smaller than 5 and a time of 1:37.58.38?
CREATE TABLE table_name_10 ( team VARCHAR, rank VARCHAR, time VARCHAR )
SELECT team FROM table_name_10 WHERE rank < 5 AND time = "1:37.58.38"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the team with a rank smaller than 5 and a time of 1:37.58.38? ### Input: CREATE TABLE table_name_10 ( team VARCHAR, rank VARCHAR, time VARCHAR ) ### Response: SELECT team FROM table_name_10 WHERE rank < 5 AND time = "1:37.58.38"
how many people voted for the top 4 parties ?
CREATE TABLE table_203_354 ( id number, "party" text, "candidate(s)" text, "votes" number, "percentage" number )
SELECT SUM("votes") FROM table_203_354 WHERE id <= 4
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many people voted for the top 4 parties ? ### Input: CREATE TABLE table_203_354 ( id number, "party" text, "candidate(s)" text, "votes" number, "percentage" number ) ### Response: SELECT SUM("votes") FROM table_203_354 WHERE id <= 4
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the average of department_id over the hire_date bin hire_date by weekday by a bar chart, list in asc by the y axis.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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 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) )
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(DEPARTMENT_ID)
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the average of department_id over the hire_date bin hire_date by weekday by a bar chart, list in asc by the y axis. ### Input: CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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 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) ) ### Response: SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(DEPARTMENT_ID)
The Crvena Zvezda club has what aggregate?
CREATE TABLE table_name_58 ( aggregate VARCHAR, club VARCHAR )
SELECT aggregate FROM table_name_58 WHERE club = "crvena zvezda"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: The Crvena Zvezda club has what aggregate? ### Input: CREATE TABLE table_name_58 ( aggregate VARCHAR, club VARCHAR ) ### Response: SELECT aggregate FROM table_name_58 WHERE club = "crvena zvezda"
Which season had 16 losses for the Hampshire team?
CREATE TABLE table_name_79 ( season VARCHAR, losses VARCHAR, team VARCHAR )
SELECT season FROM table_name_79 WHERE losses = "16" AND team = "hampshire"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which season had 16 losses for the Hampshire team? ### Input: CREATE TABLE table_name_79 ( season VARCHAR, losses VARCHAR, team VARCHAR ) ### Response: SELECT season FROM table_name_79 WHERE losses = "16" AND team = "hampshire"
Who is the opponent with a score of 5 4?
CREATE TABLE table_51776 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT "Opponent" FROM table_51776 WHERE "Score" = '5–4'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the opponent with a score of 5 4? ### Input: CREATE TABLE table_51776 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) ### Response: SELECT "Opponent" FROM table_51776 WHERE "Score" = '5–4'
What was the smallist population in 2010?
CREATE TABLE table_261951_1 ( population__2010_ INTEGER )
SELECT MIN(population__2010_) FROM table_261951_1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the smallist population in 2010? ### Input: CREATE TABLE table_261951_1 ( population__2010_ INTEGER ) ### Response: SELECT MIN(population__2010_) FROM table_261951_1
What is the first track where the production credit is margret arranged by e. mergency?
CREATE TABLE table_12796 ( "Track" real, "Title" text, "Songwriter(s)" text, "Production credits" text, "Time" text )
SELECT MIN("Track") FROM table_12796 WHERE "Production credits" = 'margret arranged by e. mergency'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the first track where the production credit is margret arranged by e. mergency? ### Input: CREATE TABLE table_12796 ( "Track" real, "Title" text, "Songwriter(s)" text, "Production credits" text, "Time" text ) ### Response: SELECT MIN("Track") FROM table_12796 WHERE "Production credits" = 'margret arranged by e. mergency'
For all employees who have the letters D or S in their first name, find hire_date and the sum of manager_id bin hire_date by weekday, and visualize them by a bar chart, order from low to high by the y-axis.
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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) )
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(MANAGER_ID)
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, find hire_date and the sum of manager_id bin hire_date by weekday, and visualize them by a bar chart, order from low to high by the y-axis. ### Input: 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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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) ) ### Response: SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(MANAGER_ID)
Who was Alicja Rosolska Partnered with when the Score in Final was 4 6, 3 6?
CREATE TABLE table_name_97 ( partnered_with VARCHAR, score_in_final VARCHAR )
SELECT partnered_with FROM table_name_97 WHERE score_in_final = "4–6, 3–6"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was Alicja Rosolska Partnered with when the Score in Final was 4 6, 3 6? ### Input: CREATE TABLE table_name_97 ( partnered_with VARCHAR, score_in_final VARCHAR ) ### Response: SELECT partnered_with FROM table_name_97 WHERE score_in_final = "4–6, 3–6"
Name the founded for school closed in 2005
CREATE TABLE table_262505_1 ( founded VARCHAR, current_conference VARCHAR )
SELECT founded FROM table_262505_1 WHERE current_conference = "school closed in 2005"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the founded for school closed in 2005 ### Input: CREATE TABLE table_262505_1 ( founded VARCHAR, current_conference VARCHAR ) ### Response: SELECT founded FROM table_262505_1 WHERE current_conference = "school closed in 2005"
What conference did the player originally from the denver broncos play in?
CREATE TABLE table_name_25 ( conf VARCHAR, original_nfl_team VARCHAR )
SELECT conf FROM table_name_25 WHERE original_nfl_team = "denver broncos"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What conference did the player originally from the denver broncos play in? ### Input: CREATE TABLE table_name_25 ( conf VARCHAR, original_nfl_team VARCHAR ) ### Response: SELECT conf FROM table_name_25 WHERE original_nfl_team = "denver broncos"
how many married patients had the procedure long title percutaneous abdominal drainage?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Percutaneous abdominal drainage"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many married patients had the procedure long title percutaneous abdominal drainage? ### Input: CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Percutaneous abdominal drainage"
Name the fewest gold for tanzania with bronze less than 0
CREATE TABLE table_name_54 ( gold INTEGER, nation VARCHAR, bronze VARCHAR )
SELECT MIN(gold) FROM table_name_54 WHERE nation = "tanzania" AND bronze < 0
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the fewest gold for tanzania with bronze less than 0 ### Input: CREATE TABLE table_name_54 ( gold INTEGER, nation VARCHAR, bronze VARCHAR ) ### Response: SELECT MIN(gold) FROM table_name_54 WHERE nation = "tanzania" AND bronze < 0
What is the tie number for Middlesbrough?
CREATE TABLE table_name_46 ( tie_no VARCHAR, home_team VARCHAR )
SELECT tie_no FROM table_name_46 WHERE home_team = "middlesbrough"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the tie number for Middlesbrough? ### Input: CREATE TABLE table_name_46 ( tie_no VARCHAR, home_team VARCHAR ) ### Response: SELECT tie_no FROM table_name_46 WHERE home_team = "middlesbrough"
Which league goals has FA cup apps of 2?
CREATE TABLE table_31788 ( "Division" text, "League Apps" real, "League Goals" real, "FA Cup Apps" real, "FA Cup Goals" real, "Total Apps" real, "Total Goals" real )
SELECT "League Goals" FROM table_31788 WHERE "FA Cup Apps" = '2'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which league goals has FA cup apps of 2? ### Input: CREATE TABLE table_31788 ( "Division" text, "League Apps" real, "League Goals" real, "FA Cup Apps" real, "FA Cup Goals" real, "Total Apps" real, "Total Goals" real ) ### Response: SELECT "League Goals" FROM table_31788 WHERE "FA Cup Apps" = '2'
what was the name of the drug prescribed to patient 030-53416 after having been diagnosed with hypovolemic shock in 05/2105 in the same day?
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time )
SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53416') AND diagnosis.diagnosisname = 'hypovolemic shock' AND STRFTIME('%y-%m', diagnosis.diagnosistime) = '2105-05') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53416') AND STRFTIME('%y-%m', medication.drugstarttime) = '2105-05') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t1.diagnosistime, 'start of day') = DATETIME(t2.drugstarttime, 'start of day')
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the name of the drug prescribed to patient 030-53416 after having been diagnosed with hypovolemic shock in 05/2105 in the same day? ### Input: CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) ### Response: SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53416') AND diagnosis.diagnosisname = 'hypovolemic shock' AND STRFTIME('%y-%m', diagnosis.diagnosistime) = '2105-05') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53416') AND STRFTIME('%y-%m', medication.drugstarttime) = '2105-05') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t1.diagnosistime, 'start of day') = DATETIME(t2.drugstarttime, 'start of day')
What is the name of the county with the greatest population?
CREATE TABLE city ( city_id number, county_id number, name text, white number, black number, amerindian number, asian number, multiracial number, hispanic number ) CREATE TABLE county_public_safety ( county_id number, name text, population number, police_officers number, residents_per_officer number, case_burden number, crime_rate number, police_force text, location text )
SELECT name FROM county_public_safety ORDER BY population DESC LIMIT 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the county with the greatest population? ### Input: CREATE TABLE city ( city_id number, county_id number, name text, white number, black number, amerindian number, asian number, multiracial number, hispanic number ) CREATE TABLE county_public_safety ( county_id number, name text, population number, police_officers number, residents_per_officer number, case_burden number, crime_rate number, police_force text, location text ) ### Response: SELECT name FROM county_public_safety ORDER BY population DESC LIMIT 1
Tell me the ages of the oldest and youngest students studying major 600.
CREATE TABLE voting_record ( stuid number, registration_date text, election_cycle text, president_vote number, vice_president_vote number, secretary_vote number, treasurer_vote number, class_president_vote number, class_senator_vote number ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text )
SELECT MAX(age), MIN(age) FROM student WHERE major = 600
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the ages of the oldest and youngest students studying major 600. ### Input: CREATE TABLE voting_record ( stuid number, registration_date text, election_cycle text, president_vote number, vice_president_vote number, secretary_vote number, treasurer_vote number, class_president_vote number, class_senator_vote number ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) ### Response: SELECT MAX(age), MIN(age) FROM student WHERE major = 600
What was the result for the best musical revival category?
CREATE TABLE table_37962 ( "Year" real, "Award" text, "Category" text, "Nominee" text, "Result" text )
SELECT "Result" FROM table_37962 WHERE "Category" = 'best musical revival'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the result for the best musical revival category? ### Input: CREATE TABLE table_37962 ( "Year" real, "Award" text, "Category" text, "Nominee" text, "Result" text ) ### Response: SELECT "Result" FROM table_37962 WHERE "Category" = 'best musical revival'
How many gold are a rank 1 and larger than 16?
CREATE TABLE table_80445 ( "Rank" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT COUNT("Gold") FROM table_80445 WHERE "Rank" = '1' AND "Total" > '16'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many gold are a rank 1 and larger than 16? ### Input: CREATE TABLE table_80445 ( "Rank" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) ### Response: SELECT COUNT("Gold") FROM table_80445 WHERE "Rank" = '1' AND "Total" > '16'
How many services are there?
CREATE TABLE services ( Id VARCHAR )
SELECT COUNT(*) FROM services
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many services are there? ### Input: CREATE TABLE services ( Id VARCHAR ) ### Response: SELECT COUNT(*) FROM services
What is the point classification with chris anker s rensen as the young rider classification and Christian vande velde as the general classification?
CREATE TABLE table_name_93 ( points_classification VARCHAR, young_rider_classification VARCHAR, general_classification VARCHAR )
SELECT points_classification FROM table_name_93 WHERE young_rider_classification = "chris anker sørensen" AND general_classification = "christian vande velde"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the point classification with chris anker s rensen as the young rider classification and Christian vande velde as the general classification? ### Input: CREATE TABLE table_name_93 ( points_classification VARCHAR, young_rider_classification VARCHAR, general_classification VARCHAR ) ### Response: SELECT points_classification FROM table_name_93 WHERE young_rider_classification = "chris anker sørensen" AND general_classification = "christian vande velde"
what is the number of capacity that mega disk ' o is able to hold ?
CREATE TABLE table_203_873 ( id number, "model name" text, "length" text, "width" text, "height" text, "riders" number, "capacity" number, "description" text, "portable" text, "notes" number )
SELECT "capacity" FROM table_203_873 WHERE "model name" = "mega disk'o"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of capacity that mega disk ' o is able to hold ? ### Input: CREATE TABLE table_203_873 ( id number, "model name" text, "length" text, "width" text, "height" text, "riders" number, "capacity" number, "description" text, "portable" text, "notes" number ) ### Response: SELECT "capacity" FROM table_203_873 WHERE "model name" = "mega disk'o"
... my posts that have links to other posts.
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostTypes ( Id number, Name text )
SELECT Id AS "post_link", CreationDate FROM Posts WHERE OwnerUserId = '##UserID##' AND Body LIKE '%http%//%'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: ... my posts that have links to other posts. ### Input: CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostTypes ( Id number, Name text ) ### Response: SELECT Id AS "post_link", CreationDate FROM Posts WHERE OwnerUserId = '##UserID##' AND Body LIKE '%http%//%'
papers from 2014
CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE venue ( venueid int, venuename varchar )
SELECT DISTINCT paperid FROM paper WHERE year = 2014
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: papers from 2014 ### Input: CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) ### Response: SELECT DISTINCT paperid FROM paper WHERE year = 2014
What is the Ti no of the Walsall Home game?
CREATE TABLE table_name_38 ( tie_no VARCHAR, home_team VARCHAR )
SELECT tie_no FROM table_name_38 WHERE home_team = "walsall"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Ti no of the Walsall Home game? ### Input: CREATE TABLE table_name_38 ( tie_no VARCHAR, home_team VARCHAR ) ### Response: SELECT tie_no FROM table_name_38 WHERE home_team = "walsall"
tell me the cost of a lab bilirubin, total, body fluid test?
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time )
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'labevents' AND cost.event_id IN (SELECT labevents.row_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bilirubin, total, body fluid'))
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the cost of a lab bilirubin, total, body fluid test? ### Input: CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) ### Response: SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'labevents' AND cost.event_id IN (SELECT labevents.row_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bilirubin, total, body fluid'))
What is the total wins with less than 2 ties, 18 goals, and less than 2 losses?
CREATE TABLE table_name_2 ( wins INTEGER, losses VARCHAR, ties VARCHAR, goals_against VARCHAR )
SELECT SUM(wins) FROM table_name_2 WHERE ties < 2 AND goals_against = 18 AND losses < 2
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total wins with less than 2 ties, 18 goals, and less than 2 losses? ### Input: CREATE TABLE table_name_2 ( wins INTEGER, losses VARCHAR, ties VARCHAR, goals_against VARCHAR ) ### Response: SELECT SUM(wins) FROM table_name_2 WHERE ties < 2 AND goals_against = 18 AND losses < 2
what is the lowest crowd at kardinia park
CREATE TABLE table_58066 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT MIN("Crowd") FROM table_58066 WHERE "Venue" = 'kardinia park'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the lowest crowd at kardinia park ### Input: CREATE TABLE table_58066 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) ### Response: SELECT MIN("Crowd") FROM table_58066 WHERE "Venue" = 'kardinia park'
Name the Home captain for venue of the oval
CREATE TABLE table_70120 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text )
SELECT "Home captain" FROM table_70120 WHERE "Venue" = 'the oval'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the Home captain for venue of the oval ### Input: CREATE TABLE table_70120 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text ) ### Response: SELECT "Home captain" FROM table_70120 WHERE "Venue" = 'the oval'
Can you tell me the highest Played that has the Points larger than 11, and the Lost larger than 7?
CREATE TABLE table_name_36 ( played INTEGER, points VARCHAR, lost VARCHAR )
SELECT MAX(played) FROM table_name_36 WHERE points > 11 AND lost > 7
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me the highest Played that has the Points larger than 11, and the Lost larger than 7? ### Input: CREATE TABLE table_name_36 ( played INTEGER, points VARCHAR, lost VARCHAR ) ### Response: SELECT MAX(played) FROM table_name_36 WHERE points > 11 AND lost > 7
How many points did he average in 1964?
CREATE TABLE table_69424 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
SELECT AVG("Points") FROM table_69424 WHERE "Year" = '1964'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many points did he average in 1964? ### Input: CREATE TABLE table_69424 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) ### Response: SELECT AVG("Points") FROM table_69424 WHERE "Year" = '1964'
what is the episode title on original air date of September 30, 2007?
CREATE TABLE table_23799417_2 ( title VARCHAR, original_airing VARCHAR )
SELECT title FROM table_23799417_2 WHERE original_airing = "September 30, 2007"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the episode title on original air date of September 30, 2007? ### Input: CREATE TABLE table_23799417_2 ( title VARCHAR, original_airing VARCHAR ) ### Response: SELECT title FROM table_23799417_2 WHERE original_airing = "September 30, 2007"
What is the counting method for a network-centric basis?
CREATE TABLE table_66775 ( "Counting Method" text, "Basis" text, "Name" text, "Directed / Undirected" text, "Induced / Non-Induced" text )
SELECT "Counting Method" FROM table_66775 WHERE "Basis" = 'network-centric'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the counting method for a network-centric basis? ### Input: CREATE TABLE table_66775 ( "Counting Method" text, "Basis" text, "Name" text, "Directed / Undirected" text, "Induced / Non-Induced" text ) ### Response: SELECT "Counting Method" FROM table_66775 WHERE "Basis" = 'network-centric'
How many points on average had a position smaller than 8, 16 plays, and a lost larger than 9?
CREATE TABLE table_name_20 ( points INTEGER, lost VARCHAR, position VARCHAR, played VARCHAR )
SELECT AVG(points) FROM table_name_20 WHERE position < 8 AND played = 16 AND lost > 9
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many points on average had a position smaller than 8, 16 plays, and a lost larger than 9? ### Input: CREATE TABLE table_name_20 ( points INTEGER, lost VARCHAR, position VARCHAR, played VARCHAR ) ### Response: SELECT AVG(points) FROM table_name_20 WHERE position < 8 AND played = 16 AND lost > 9
What date has the format of CD and catalog of alca-274?
CREATE TABLE table_name_72 ( date VARCHAR, format VARCHAR, catalog VARCHAR )
SELECT date FROM table_name_72 WHERE format = "cd" AND catalog = "alca-274"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date has the format of CD and catalog of alca-274? ### Input: CREATE TABLE table_name_72 ( date VARCHAR, format VARCHAR, catalog VARCHAR ) ### Response: SELECT date FROM table_name_72 WHERE format = "cd" AND catalog = "alca-274"
Which Free polite has a Genitive 1 of *=ku?
CREATE TABLE table_name_13 ( free VARCHAR, ku VARCHAR, genitive_1 VARCHAR )
SELECT free AS polite FROM table_name_13 WHERE genitive_1 = * = ku
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Free polite has a Genitive 1 of *=ku? ### Input: CREATE TABLE table_name_13 ( free VARCHAR, ku VARCHAR, genitive_1 VARCHAR ) ### Response: SELECT free AS polite FROM table_name_13 WHERE genitive_1 = * = ku
How many pens does Siaosi Atiola have?
CREATE TABLE table_name_80 ( pens VARCHAR, player VARCHAR )
SELECT pens FROM table_name_80 WHERE player = "siaosi atiola"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many pens does Siaosi Atiola have? ### Input: CREATE TABLE table_name_80 ( pens VARCHAR, player VARCHAR ) ### Response: SELECT pens FROM table_name_80 WHERE player = "siaosi atiola"
Which college/junior/club team did the player play on that played for the Buffalo Sabres in NHL?
CREATE TABLE table_1473672_3 ( college_junior_club_team VARCHAR, nhl_team VARCHAR )
SELECT college_junior_club_team FROM table_1473672_3 WHERE nhl_team = "Buffalo Sabres"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which college/junior/club team did the player play on that played for the Buffalo Sabres in NHL? ### Input: CREATE TABLE table_1473672_3 ( college_junior_club_team VARCHAR, nhl_team VARCHAR ) ### Response: SELECT college_junior_club_team FROM table_1473672_3 WHERE nhl_team = "Buffalo Sabres"
tell me the number of versions that are scrapped .
CREATE TABLE table_204_751 ( id number, "date" text, "train" text, "location" text, "present location" text, "comments" text, "top speed (km/h)" text )
SELECT COUNT("train") FROM table_204_751 WHERE "present location" = 'scrapped'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the number of versions that are scrapped . ### Input: CREATE TABLE table_204_751 ( id number, "date" text, "train" text, "location" text, "present location" text, "comments" text, "top speed (km/h)" text ) ### Response: SELECT COUNT("train") FROM table_204_751 WHERE "present location" = 'scrapped'
What is the number of Ashmolean with 14s Harrison, and image less than 542?
CREATE TABLE table_name_40 ( ashmolean VARCHAR, harrison VARCHAR, image VARCHAR )
SELECT COUNT(ashmolean) FROM table_name_40 WHERE harrison = "14s" AND image < 542
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of Ashmolean with 14s Harrison, and image less than 542? ### Input: CREATE TABLE table_name_40 ( ashmolean VARCHAR, harrison VARCHAR, image VARCHAR ) ### Response: SELECT COUNT(ashmolean) FROM table_name_40 WHERE harrison = "14s" AND image < 542
What was the rank when then time was 7:52.53?
CREATE TABLE table_65950 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text )
SELECT MIN("Rank") FROM table_65950 WHERE "Time" = '7:52.53'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the rank when then time was 7:52.53? ### Input: CREATE TABLE table_65950 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text ) ### Response: SELECT MIN("Rank") FROM table_65950 WHERE "Time" = '7:52.53'
What was the loss for Boris Picano-Nacci?
CREATE TABLE table_75985 ( "Name" text, "Country" text, "Date(s)" text, "Loss" text, "Institution" text, "Market activity" text )
SELECT "Loss" FROM table_75985 WHERE "Name" = 'boris picano-nacci'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the loss for Boris Picano-Nacci? ### Input: CREATE TABLE table_75985 ( "Name" text, "Country" text, "Date(s)" text, "Loss" text, "Institution" text, "Market activity" text ) ### Response: SELECT "Loss" FROM table_75985 WHERE "Name" = 'boris picano-nacci'
For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id, and rank by the y-axis in asc.
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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) )
SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID)
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id, and rank by the y-axis in asc. ### Input: 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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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) ) ### Response: SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID)
What is the male incarceration rate of maule?
CREATE TABLE table_25042332_31 ( incarceration_rate_male INTEGER, region VARCHAR )
SELECT MAX(incarceration_rate_male) FROM table_25042332_31 WHERE region = "Maule"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the male incarceration rate of maule? ### Input: CREATE TABLE table_25042332_31 ( incarceration_rate_male INTEGER, region VARCHAR ) ### Response: SELECT MAX(incarceration_rate_male) FROM table_25042332_31 WHERE region = "Maule"
what is icu stay id of subject id 3343?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT prescriptions.icustay_id FROM prescriptions WHERE prescriptions.subject_id = "3343"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is icu stay id of subject id 3343? ### Input: CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) ### Response: SELECT prescriptions.icustay_id FROM prescriptions WHERE prescriptions.subject_id = "3343"
Where was the match on 10/11/2001 against 15?
CREATE TABLE table_name_3 ( venue VARCHAR, against VARCHAR, date VARCHAR )
SELECT venue FROM table_name_3 WHERE against = 15 AND date = "10/11/2001"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where was the match on 10/11/2001 against 15? ### Input: CREATE TABLE table_name_3 ( venue VARCHAR, against VARCHAR, date VARCHAR ) ### Response: SELECT venue FROM table_name_3 WHERE against = 15 AND date = "10/11/2001"
What is the title of the course with Differential Geometry as a prerequisite?
CREATE TABLE instructor ( id text, name text, dept_name text, salary number ) CREATE TABLE department ( dept_name text, building text, budget number ) CREATE TABLE teaches ( id text, course_id text, sec_id text, semester text, year number ) CREATE TABLE course ( course_id text, title text, dept_name text, credits number ) CREATE TABLE time_slot ( time_slot_id text, day text, start_hr number, start_min number, end_hr number, end_min number ) CREATE TABLE advisor ( s_id text, i_id text ) CREATE TABLE student ( id text, name text, dept_name text, tot_cred number ) CREATE TABLE takes ( id text, course_id text, sec_id text, semester text, year number, grade text ) CREATE TABLE prereq ( course_id text, prereq_id text ) CREATE TABLE section ( course_id text, sec_id text, semester text, year number, building text, room_number text, time_slot_id text ) CREATE TABLE classroom ( building text, room_number text, capacity number )
SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the title of the course with Differential Geometry as a prerequisite? ### Input: CREATE TABLE instructor ( id text, name text, dept_name text, salary number ) CREATE TABLE department ( dept_name text, building text, budget number ) CREATE TABLE teaches ( id text, course_id text, sec_id text, semester text, year number ) CREATE TABLE course ( course_id text, title text, dept_name text, credits number ) CREATE TABLE time_slot ( time_slot_id text, day text, start_hr number, start_min number, end_hr number, end_min number ) CREATE TABLE advisor ( s_id text, i_id text ) CREATE TABLE student ( id text, name text, dept_name text, tot_cred number ) CREATE TABLE takes ( id text, course_id text, sec_id text, semester text, year number, grade text ) CREATE TABLE prereq ( course_id text, prereq_id text ) CREATE TABLE section ( course_id text, sec_id text, semester text, year number, building text, room_number text, time_slot_id text ) CREATE TABLE classroom ( building text, room_number text, capacity number ) ### Response: SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')
How many points did agnieszka radwa ska score?
CREATE TABLE table_2356 ( "Sd" real, "Player" text, "Points" real, "Points defending" real, "Points won" real, "New points" real, "Status" text )
SELECT "Points" FROM table_2356 WHERE "Player" = 'Agnieszka Radwańska'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many points did agnieszka radwa ska score? ### Input: CREATE TABLE table_2356 ( "Sd" real, "Player" text, "Points" real, "Points defending" real, "Points won" real, "New points" real, "Status" text ) ### Response: SELECT "Points" FROM table_2356 WHERE "Player" = 'Agnieszka Radwańska'
What is the name of the director of the episode written by robin schwartz & robert tarlow?
CREATE TABLE table_name_55 ( directed_by VARCHAR, written_by VARCHAR )
SELECT directed_by FROM table_name_55 WHERE written_by = "robin schwartz & robert tarlow"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the director of the episode written by robin schwartz & robert tarlow? ### Input: CREATE TABLE table_name_55 ( directed_by VARCHAR, written_by VARCHAR ) ### Response: SELECT directed_by FROM table_name_55 WHERE written_by = "robin schwartz & robert tarlow"
Top Answerers by Accepted Percentage.
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text )
SELECT A.OwnerUserId AS "user_link", (CAST(COUNT(A.Id) AS FLOAT) / (SELECT COUNT(*) FROM Posts WHERE OwnerUserId = A.OwnerUserId AND PostTypeId = 2) * 100) AS AcceptedPercent FROM Posts AS A INNER JOIN Posts AS Q ON Q.AcceptedAnswerId = A.Id WHERE A.PostTypeId = 2 AND (SELECT COUNT(*) FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = A.OwnerUserId) > 100 GROUP BY A.OwnerUserId ORDER BY 'acceptedpercent' DESC LIMIT @N
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top Answerers by Accepted Percentage. ### Input: CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) ### Response: SELECT A.OwnerUserId AS "user_link", (CAST(COUNT(A.Id) AS FLOAT) / (SELECT COUNT(*) FROM Posts WHERE OwnerUserId = A.OwnerUserId AND PostTypeId = 2) * 100) AS AcceptedPercent FROM Posts AS A INNER JOIN Posts AS Q ON Q.AcceptedAnswerId = A.Id WHERE A.PostTypeId = 2 AND (SELECT COUNT(*) FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = A.OwnerUserId) > 100 GROUP BY A.OwnerUserId ORDER BY 'acceptedpercent' DESC LIMIT @N
what is the number of democratic gains listed ?
CREATE TABLE table_203_615 ( id number, "district" text, "incumbent" text, "party" text, "first\nelected" number, "result" text, "candidates" text )
SELECT COUNT(*) FROM table_203_615 WHERE "result" = 'democratic gain'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of democratic gains listed ? ### Input: CREATE TABLE table_203_615 ( id number, "district" text, "incumbent" text, "party" text, "first\nelected" number, "result" text, "candidates" text ) ### Response: SELECT COUNT(*) FROM table_203_615 WHERE "result" = 'democratic gain'
What iwas the attendance of the game that took place on december 6, 1998?
CREATE TABLE table_8742 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
SELECT "Attendance" FROM table_8742 WHERE "Date" = 'december 6, 1998'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What iwas the attendance of the game that took place on december 6, 1998? ### Input: CREATE TABLE table_8742 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) ### Response: SELECT "Attendance" FROM table_8742 WHERE "Date" = 'december 6, 1998'
Visualize a bar chart for how many assets can each parts be used in? List the part name and the number, and I want to list Y-axis from high to low order.
CREATE TABLE Fault_Log ( fault_log_entry_id INTEGER, asset_id INTEGER, recorded_by_staff_id INTEGER, fault_log_entry_datetime DATETIME, fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Asset_Parts ( asset_id INTEGER, part_id INTEGER ) CREATE TABLE Staff ( staff_id INTEGER, staff_name VARCHAR(255), gender VARCHAR(1), other_staff_details VARCHAR(255) ) CREATE TABLE Skills_Required_To_Fix ( part_fault_id INTEGER, skill_id INTEGER ) CREATE TABLE Fault_Log_Parts ( fault_log_entry_id INTEGER, part_fault_id INTEGER, fault_status VARCHAR(10) ) CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Skills ( skill_id INTEGER, skill_code VARCHAR(20), skill_description VARCHAR(255) ) CREATE TABLE Part_Faults ( part_fault_id INTEGER, part_id INTEGER, fault_short_name VARCHAR(20), fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CREATE TABLE Parts ( part_id INTEGER, part_name VARCHAR(255), chargeable_yn VARCHAR(1), chargeable_amount VARCHAR(20), other_part_details VARCHAR(255) ) CREATE TABLE Engineer_Visits ( engineer_visit_id INTEGER, contact_staff_id INTEGER, engineer_id INTEGER, fault_log_entry_id INTEGER, fault_status VARCHAR(10), visit_start_datetime DATETIME, visit_end_datetime DATETIME, other_visit_details VARCHAR(255) ) CREATE TABLE Engineer_Skills ( engineer_id INTEGER, skill_id INTEGER ) CREATE TABLE Third_Party_Companies ( company_id INTEGER, company_type VARCHAR(5), company_name VARCHAR(255), company_address VARCHAR(255), other_company_details VARCHAR(255) ) CREATE TABLE Assets ( asset_id INTEGER, maintenance_contract_id INTEGER, supplier_company_id INTEGER, asset_details VARCHAR(255), asset_make VARCHAR(20), asset_model VARCHAR(20), asset_acquired_date DATETIME, asset_disposed_date DATETIME, other_asset_details VARCHAR(255) )
SELECT part_name, COUNT(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY COUNT(*) DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a bar chart for how many assets can each parts be used in? List the part name and the number, and I want to list Y-axis from high to low order. ### Input: CREATE TABLE Fault_Log ( fault_log_entry_id INTEGER, asset_id INTEGER, recorded_by_staff_id INTEGER, fault_log_entry_datetime DATETIME, fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Asset_Parts ( asset_id INTEGER, part_id INTEGER ) CREATE TABLE Staff ( staff_id INTEGER, staff_name VARCHAR(255), gender VARCHAR(1), other_staff_details VARCHAR(255) ) CREATE TABLE Skills_Required_To_Fix ( part_fault_id INTEGER, skill_id INTEGER ) CREATE TABLE Fault_Log_Parts ( fault_log_entry_id INTEGER, part_fault_id INTEGER, fault_status VARCHAR(10) ) CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Skills ( skill_id INTEGER, skill_code VARCHAR(20), skill_description VARCHAR(255) ) CREATE TABLE Part_Faults ( part_fault_id INTEGER, part_id INTEGER, fault_short_name VARCHAR(20), fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CREATE TABLE Parts ( part_id INTEGER, part_name VARCHAR(255), chargeable_yn VARCHAR(1), chargeable_amount VARCHAR(20), other_part_details VARCHAR(255) ) CREATE TABLE Engineer_Visits ( engineer_visit_id INTEGER, contact_staff_id INTEGER, engineer_id INTEGER, fault_log_entry_id INTEGER, fault_status VARCHAR(10), visit_start_datetime DATETIME, visit_end_datetime DATETIME, other_visit_details VARCHAR(255) ) CREATE TABLE Engineer_Skills ( engineer_id INTEGER, skill_id INTEGER ) CREATE TABLE Third_Party_Companies ( company_id INTEGER, company_type VARCHAR(5), company_name VARCHAR(255), company_address VARCHAR(255), other_company_details VARCHAR(255) ) CREATE TABLE Assets ( asset_id INTEGER, maintenance_contract_id INTEGER, supplier_company_id INTEGER, asset_details VARCHAR(255), asset_make VARCHAR(20), asset_model VARCHAR(20), asset_acquired_date DATETIME, asset_disposed_date DATETIME, other_asset_details VARCHAR(255) ) ### Response: SELECT part_name, COUNT(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY COUNT(*) DESC
What was the location of the bout that lasted 5:00 and led to a 6-2-1 record?
CREATE TABLE table_37136 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
SELECT "Location" FROM table_37136 WHERE "Time" = '5:00' AND "Record" = '6-2-1'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the location of the bout that lasted 5:00 and led to a 6-2-1 record? ### Input: CREATE TABLE table_37136 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) ### Response: SELECT "Location" FROM table_37136 WHERE "Time" = '5:00' AND "Record" = '6-2-1'
When western carolina university is the school what is the control?
CREATE TABLE table_2076516_1 ( control VARCHAR, school VARCHAR )
SELECT control FROM table_2076516_1 WHERE school = "Western Carolina University"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When western carolina university is the school what is the control? ### Input: CREATE TABLE table_2076516_1 ( control VARCHAR, school VARCHAR ) ### Response: SELECT control FROM table_2076516_1 WHERE school = "Western Carolina University"
What is the amount of 000s from 1996?
CREATE TABLE table_name_20 ( total__000s_ INTEGER, year VARCHAR )
SELECT SUM(total__000s_) FROM table_name_20 WHERE year = "1996"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the amount of 000s from 1996? ### Input: CREATE TABLE table_name_20 ( total__000s_ INTEGER, year VARCHAR ) ### Response: SELECT SUM(total__000s_) FROM table_name_20 WHERE year = "1996"
Name who wrote the episode when the viewers was 1.81
CREATE TABLE table_15584067_7 ( written_by VARCHAR, us_viewers__million_ VARCHAR )
SELECT written_by FROM table_15584067_7 WHERE us_viewers__million_ = "1.81"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name who wrote the episode when the viewers was 1.81 ### Input: CREATE TABLE table_15584067_7 ( written_by VARCHAR, us_viewers__million_ VARCHAR ) ### Response: SELECT written_by FROM table_15584067_7 WHERE us_viewers__million_ = "1.81"
what is the laps when the grid is less than 2?
CREATE TABLE table_name_38 ( laps VARCHAR, grid INTEGER )
SELECT laps FROM table_name_38 WHERE grid < 2
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the laps when the grid is less than 2? ### Input: CREATE TABLE table_name_38 ( laps VARCHAR, grid INTEGER ) ### Response: SELECT laps FROM table_name_38 WHERE grid < 2
What is the name of the venue that away team footscray played at?
CREATE TABLE table_56963 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Venue" FROM table_56963 WHERE "Away team" = 'footscray'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the venue that away team footscray played at? ### Input: CREATE TABLE table_56963 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) ### Response: SELECT "Venue" FROM table_56963 WHERE "Away team" = 'footscray'
How many points for were scored by the team that won exactly 22?
CREATE TABLE table_74081 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Points" text )
SELECT "Points for" FROM table_74081 WHERE "Won" = '22'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many points for were scored by the team that won exactly 22? ### Input: CREATE TABLE table_74081 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Points" text ) ### Response: SELECT "Points for" FROM table_74081 WHERE "Won" = '22'
Name the circuit for hertz british grand prix
CREATE TABLE table_30130 ( "Round" real, "Date" text, "Grand Prix" text, "Circuit" text, "MotoGP winner" text, "Moto2 winner" text, "Moto3 winner" text, "Report" text )
SELECT "Circuit" FROM table_30130 WHERE "Grand Prix" = 'Hertz British Grand Prix'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the circuit for hertz british grand prix ### Input: CREATE TABLE table_30130 ( "Round" real, "Date" text, "Grand Prix" text, "Circuit" text, "MotoGP winner" text, "Moto2 winner" text, "Moto3 winner" text, "Report" text ) ### Response: SELECT "Circuit" FROM table_30130 WHERE "Grand Prix" = 'Hertz British Grand Prix'
provide the number of patients whose admission type is emergency and drug name is sodium polystyrene sulfonate?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text )
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Sodium Polystyrene Sulfonate"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose admission type is emergency and drug name is sodium polystyrene sulfonate? ### Input: CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Sodium Polystyrene Sulfonate"
How many bats does Todd have?
CREATE TABLE table_36837 ( "Surname" text, "First" text, "D.O.B." text, "Bats" text, "Throws" text, "Position" text )
SELECT "Bats" FROM table_36837 WHERE "First" = 'todd'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many bats does Todd have? ### Input: CREATE TABLE table_36837 ( "Surname" text, "First" text, "D.O.B." text, "Bats" text, "Throws" text, "Position" text ) ### Response: SELECT "Bats" FROM table_36837 WHERE "First" = 'todd'
What was the average year that Xuxa 3 earned the certification 2x platinum, and that the sales were higher than 750,000?
CREATE TABLE table_name_60 ( year INTEGER, sales VARCHAR, certification VARCHAR, álbum VARCHAR )
SELECT AVG(year) FROM table_name_60 WHERE certification = "2x platinum" AND álbum = "xuxa 3" AND sales > 750 OFFSET 000
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the average year that Xuxa 3 earned the certification 2x platinum, and that the sales were higher than 750,000? ### Input: CREATE TABLE table_name_60 ( year INTEGER, sales VARCHAR, certification VARCHAR, álbum VARCHAR ) ### Response: SELECT AVG(year) FROM table_name_60 WHERE certification = "2x platinum" AND álbum = "xuxa 3" AND sales > 750 OFFSET 000
when was otar iosseliani's film selected
CREATE TABLE table_22142 ( "Year [e ] (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Main Language(s)" text, "Result" text )
SELECT "Year [e ] (Ceremony)" FROM table_22142 WHERE "Director" = 'Otar Iosseliani'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was otar iosseliani's film selected ### Input: CREATE TABLE table_22142 ( "Year [e ] (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Main Language(s)" text, "Result" text ) ### Response: SELECT "Year [e ] (Ceremony)" FROM table_22142 WHERE "Director" = 'Otar Iosseliani'
what is the number of patients whose drug name is sulfameth/trimethoprim suspension?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text )
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Sulfameth/Trimethoprim Suspension"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose drug name is sulfameth/trimethoprim suspension? ### Input: CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Sulfameth/Trimethoprim Suspension"
Which provider is pay with analogue cable?
CREATE TABLE table_58973 ( "Provider" text, "Years" text, "Free or pay" text, "No. of channels" text, "Colour" text, "Digital" text, "Transmission" text )
SELECT "Provider" FROM table_58973 WHERE "Free or pay" = 'pay' AND "Transmission" = 'analogue cable'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which provider is pay with analogue cable? ### Input: CREATE TABLE table_58973 ( "Provider" text, "Years" text, "Free or pay" text, "No. of channels" text, "Colour" text, "Digital" text, "Transmission" text ) ### Response: SELECT "Provider" FROM table_58973 WHERE "Free or pay" = 'pay' AND "Transmission" = 'analogue cable'
How many years did notre dame participate?
CREATE TABLE table_1571238_2 ( years_participated INTEGER, team VARCHAR )
SELECT MAX(years_participated) FROM table_1571238_2 WHERE team = "Notre Dame"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many years did notre dame participate? ### Input: CREATE TABLE table_1571238_2 ( years_participated INTEGER, team VARCHAR ) ### Response: SELECT MAX(years_participated) FROM table_1571238_2 WHERE team = "Notre Dame"
severe renal insufficiency ( creatinine clearance < 30 ml / min )
CREATE TABLE table_test_26 ( "id" int, "bleeding" int, "left_ventricular_ejection_fraction_lvef" int, "left_main_coronary_artery_disease" bool, "uncontrolled_diabetes" bool, "hiv_infection" bool, "hemoglobin_a1c_hba1c" float, "hepatitis_b_infection" bool, "renal_disease" bool, "unprotected_left_main_disease" bool, "creatinine_clearance_cl" float, "stenosis" int, "hepatitis_c_infection" bool, "alcohol_abuse" bool, "body_mass_index_bmi" float, "NOUSE" float )
SELECT * FROM table_test_26 WHERE renal_disease = 1 OR creatinine_clearance_cl < 30
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: severe renal insufficiency ( creatinine clearance < 30 ml / min ) ### Input: CREATE TABLE table_test_26 ( "id" int, "bleeding" int, "left_ventricular_ejection_fraction_lvef" int, "left_main_coronary_artery_disease" bool, "uncontrolled_diabetes" bool, "hiv_infection" bool, "hemoglobin_a1c_hba1c" float, "hepatitis_b_infection" bool, "renal_disease" bool, "unprotected_left_main_disease" bool, "creatinine_clearance_cl" float, "stenosis" int, "hepatitis_c_infection" bool, "alcohol_abuse" bool, "body_mass_index_bmi" float, "NOUSE" float ) ### Response: SELECT * FROM table_test_26 WHERE renal_disease = 1 OR creatinine_clearance_cl < 30
How many episodes did Eve Weston write?
CREATE TABLE table_29530 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (millions)" text, "Original U.S. air date" text, "Prod. code" real )
SELECT COUNT("No. in series") FROM table_29530 WHERE "Written by" = 'Eve Weston'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many episodes did Eve Weston write? ### Input: CREATE TABLE table_29530 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (millions)" text, "Original U.S. air date" text, "Prod. code" real ) ### Response: SELECT COUNT("No. in series") FROM table_29530 WHERE "Written by" = 'Eve Weston'
What was the W-L record when HIgh Points was andre miller (30)?
CREATE TABLE table_17323042_11 ( record VARCHAR, high_points VARCHAR )
SELECT record FROM table_17323042_11 WHERE high_points = "Andre Miller (30)"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the W-L record when HIgh Points was andre miller (30)? ### Input: CREATE TABLE table_17323042_11 ( record VARCHAR, high_points VARCHAR ) ### Response: SELECT record FROM table_17323042_11 WHERE high_points = "Andre Miller (30)"
how many patients of asian ethnicity are under 48 years of age?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.age < "48"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients of asian ethnicity are under 48 years of age? ### Input: CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) ### Response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.age < "48"
what are the five most common microbiology tests that patients had within 2 months after receiving colonoscopy the previous year?
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number )
SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'colonoscopy') AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime FROM microbiologyevents JOIN admissions ON microbiologyevents.hadm_id = admissions.hadm_id WHERE DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t2.charttime) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month') GROUP BY t2.spec_type_desc) AS t3 WHERE t3.c1 <= 5
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the five most common microbiology tests that patients had within 2 months after receiving colonoscopy the previous year? ### Input: CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) ### Response: SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'colonoscopy') AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime FROM microbiologyevents JOIN admissions ON microbiologyevents.hadm_id = admissions.hadm_id WHERE DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t2.charttime) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month') GROUP BY t2.spec_type_desc) AS t3 WHERE t3.c1 <= 5
Roslinda Samsu has what nationality?
CREATE TABLE table_name_87 ( nationality VARCHAR, name VARCHAR )
SELECT nationality FROM table_name_87 WHERE name = "roslinda samsu"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Roslinda Samsu has what nationality? ### Input: CREATE TABLE table_name_87 ( nationality VARCHAR, name VARCHAR ) ### Response: SELECT nationality FROM table_name_87 WHERE name = "roslinda samsu"
Which Grid has a Driver of johnny dumfries?
CREATE TABLE table_53697 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT "Grid" FROM table_53697 WHERE "Driver" = 'johnny dumfries'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Grid has a Driver of johnny dumfries? ### Input: CREATE TABLE table_53697 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) ### Response: SELECT "Grid" FROM table_53697 WHERE "Driver" = 'johnny dumfries'
How did the election end for Robert Wexler?
CREATE TABLE table_18144 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text )
SELECT "Results" FROM table_18144 WHERE "Incumbent" = 'Robert Wexler'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How did the election end for Robert Wexler? ### Input: CREATE TABLE table_18144 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text ) ### Response: SELECT "Results" FROM table_18144 WHERE "Incumbent" = 'Robert Wexler'
Which Rank has Goals larger than 10, and a Scorer of choi sang-kuk?
CREATE TABLE table_name_35 ( rank VARCHAR, goals VARCHAR, scorer VARCHAR )
SELECT rank FROM table_name_35 WHERE goals > 10 AND scorer = "choi sang-kuk"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Rank has Goals larger than 10, and a Scorer of choi sang-kuk? ### Input: CREATE TABLE table_name_35 ( rank VARCHAR, goals VARCHAR, scorer VARCHAR ) ### Response: SELECT rank FROM table_name_35 WHERE goals > 10 AND scorer = "choi sang-kuk"
What is the Place of the Player with a Score of 69-72-72=213?
CREATE TABLE table_12501 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
SELECT "Place" FROM table_12501 WHERE "Score" = '69-72-72=213'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Place of the Player with a Score of 69-72-72=213? ### Input: CREATE TABLE table_12501 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) ### Response: SELECT "Place" FROM table_12501 WHERE "Score" = '69-72-72=213'
patients with severe renal impairment ( estimated creatinine clearance < 35 ml / min ) .
CREATE TABLE table_train_89 ( "id" int, "chronically_uncontrolled_hypertension" bool, "uncontrolled_diabetes" bool, "hemoglobin_a1c_hba1c" float, "body_weight" float, "renal_disease" bool, "creatinine_clearance_cl" float, "geriatric_depression_scale_gds" int, "major_depression" bool, "NOUSE" float )
SELECT * FROM table_train_89 WHERE renal_disease = 1 OR creatinine_clearance_cl < 35
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: patients with severe renal impairment ( estimated creatinine clearance < 35 ml / min ) . ### Input: CREATE TABLE table_train_89 ( "id" int, "chronically_uncontrolled_hypertension" bool, "uncontrolled_diabetes" bool, "hemoglobin_a1c_hba1c" float, "body_weight" float, "renal_disease" bool, "creatinine_clearance_cl" float, "geriatric_depression_scale_gds" int, "major_depression" bool, "NOUSE" float ) ### Response: SELECT * FROM table_train_89 WHERE renal_disease = 1 OR creatinine_clearance_cl < 35
What's the density in the district with 2320529 citizens in 2011?
CREATE TABLE table_3951 ( "Code" text, "District" text, "Headquarters" text, "Population (2001 Census)" real, "Population (2011 Census)" real, "Area (km\u00b2)" real, "Density in 2011 (/km\u00b2)" text )
SELECT "Density in 2011 (/km\u00b2)" FROM table_3951 WHERE "Population (2011 Census)" = '2320529'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the density in the district with 2320529 citizens in 2011? ### Input: CREATE TABLE table_3951 ( "Code" text, "District" text, "Headquarters" text, "Population (2001 Census)" real, "Population (2011 Census)" real, "Area (km\u00b2)" real, "Density in 2011 (/km\u00b2)" text ) ### Response: SELECT "Density in 2011 (/km\u00b2)" FROM table_3951 WHERE "Population (2011 Census)" = '2320529'
What college did the player who was drafted by Calgary go to?
CREATE TABLE table_30269 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
SELECT "College" FROM table_30269 WHERE "CFL Team" = 'Calgary'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What college did the player who was drafted by Calgary go to? ### Input: CREATE TABLE table_30269 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) ### Response: SELECT "College" FROM table_30269 WHERE "CFL Team" = 'Calgary'
What is the least 08-09 i/o best?
CREATE TABLE table_26422 ( "Rank" real, "WS Points" real, "Name" text, "Country" text, "08-09 I/O best" real, "08-09 GP/JGP best" real, "08-09 GP/JGP 2nd" real, "08-09 OI best" real, "08-09 OI 2nd" real, "07-08 I/O best" real, "07-08 GP/JGP best" real, "07-08 GP/JGP 2nd" real, "07-08 OI best" real, "07-08 OI 2nd" real )
SELECT MIN("08-09 I/O best") FROM table_26422
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the least 08-09 i/o best? ### Input: CREATE TABLE table_26422 ( "Rank" real, "WS Points" real, "Name" text, "Country" text, "08-09 I/O best" real, "08-09 GP/JGP best" real, "08-09 GP/JGP 2nd" real, "08-09 OI best" real, "08-09 OI 2nd" real, "07-08 I/O best" real, "07-08 GP/JGP best" real, "07-08 GP/JGP 2nd" real, "07-08 OI best" real, "07-08 OI 2nd" real ) ### Response: SELECT MIN("08-09 I/O best") FROM table_26422
What is the fewest number of wins when he has 3 poles in 2010?
CREATE TABLE table_37723 ( "Season" text, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "Points" text, "Position" text )
SELECT MIN("Wins") FROM table_37723 WHERE "Poles" = '3' AND "Season" = '2010'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the fewest number of wins when he has 3 poles in 2010? ### Input: CREATE TABLE table_37723 ( "Season" text, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "Points" text, "Position" text ) ### Response: SELECT MIN("Wins") FROM table_37723 WHERE "Poles" = '3' AND "Season" = '2010'
get the short title as well as the icd9 code of diagnoses for patient with patient id 55094.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text )
SELECT diagnoses.icd9_code, diagnoses.short_title FROM diagnoses WHERE diagnoses.subject_id = "55094"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: get the short title as well as the icd9 code of diagnoses for patient with patient id 55094. ### Input: CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ### Response: SELECT diagnoses.icd9_code, diagnoses.short_title FROM diagnoses WHERE diagnoses.subject_id = "55094"
A bar chart for what are the number of the completion dates of all the tests that have result 'Fail'?, and I want to sort in ascending by the y-axis.
CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80), gender_mf VARCHAR(1), address_line_1 VARCHAR(80) ) CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME ) CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) )
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" ORDER BY COUNT(date_of_completion)
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart for what are the number of the completion dates of all the tests that have result 'Fail'?, and I want to sort in ascending by the y-axis. ### Input: CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80), gender_mf VARCHAR(1), address_line_1 VARCHAR(80) ) CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME ) CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) ### Response: SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" ORDER BY COUNT(date_of_completion)
What day(s) did they play on week 2?
CREATE TABLE table_20781 ( "Week" real, "Date" text, "Kickoff" text, "Opponent" text, "Final score" text, "Team record" text, "Game site" text, "Attendance" real )
SELECT "Date" FROM table_20781 WHERE "Week" = '2'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What day(s) did they play on week 2? ### Input: CREATE TABLE table_20781 ( "Week" real, "Date" text, "Kickoff" text, "Opponent" text, "Final score" text, "Team record" text, "Game site" text, "Attendance" real ) ### Response: SELECT "Date" FROM table_20781 WHERE "Week" = '2'
Name the status for six flags new england
CREATE TABLE table_name_29 ( status VARCHAR, park VARCHAR )
SELECT status FROM table_name_29 WHERE park = "six flags new england"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the status for six flags new england ### Input: CREATE TABLE table_name_29 ( status VARCHAR, park VARCHAR ) ### Response: SELECT status FROM table_name_29 WHERE park = "six flags new england"
What player is a center born in 1977?
CREATE TABLE table_name_79 ( player VARCHAR, position VARCHAR, year_born VARCHAR )
SELECT player FROM table_name_79 WHERE position = "center" AND year_born = 1977
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What player is a center born in 1977? ### Input: CREATE TABLE table_name_79 ( player VARCHAR, position VARCHAR, year_born VARCHAR ) ### Response: SELECT player FROM table_name_79 WHERE position = "center" AND year_born = 1977
What was the result of April 27's game?
CREATE TABLE table_name_21 ( score VARCHAR, date VARCHAR )
SELECT score FROM table_name_21 WHERE date = "april 27"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the result of April 27's game? ### Input: CREATE TABLE table_name_21 ( score VARCHAR, date VARCHAR ) ### Response: SELECT score FROM table_name_21 WHERE date = "april 27"
how many students are enrolled at harvard university according to this chart ?
CREATE TABLE table_203_592 ( id number, "institution" text, "location" text, "athletic nickname" text, "undergraduate enrollment" number, "graduate enrollment" number, "total enrollment" number, "2013 endowment\n(and us rank)" text, "academic staff" number, "motto" text )
SELECT "total enrollment" FROM table_203_592 WHERE "institution" = 'harvard university'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many students are enrolled at harvard university according to this chart ? ### Input: CREATE TABLE table_203_592 ( id number, "institution" text, "location" text, "athletic nickname" text, "undergraduate enrollment" number, "graduate enrollment" number, "total enrollment" number, "2013 endowment\n(and us rank)" text, "academic staff" number, "motto" text ) ### Response: SELECT "total enrollment" FROM table_203_592 WHERE "institution" = 'harvard university'
Who directed the episodes that aired December 15, 1956?
CREATE TABLE table_28110 ( "Series #" real, "Season #" real, "Title" text, "Director" text, "Writer(s)" text, "Airdate" text )
SELECT "Director" FROM table_28110 WHERE "Airdate" = 'December 15, 1956'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who directed the episodes that aired December 15, 1956? ### Input: CREATE TABLE table_28110 ( "Series #" real, "Season #" real, "Title" text, "Director" text, "Writer(s)" text, "Airdate" text ) ### Response: SELECT "Director" FROM table_28110 WHERE "Airdate" = 'December 15, 1956'
Which party won less than 21 seats, has 0 percent of seats, and 69757 votes cast?
CREATE TABLE table_38425 ( "Party" text, "Votes cast" real, "Percentage" real, "Seats won" real, "Percent of seats" real )
SELECT "Party" FROM table_38425 WHERE "Seats won" < '21' AND "Percent of seats" = '0' AND "Votes cast" = '69757'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which party won less than 21 seats, has 0 percent of seats, and 69757 votes cast? ### Input: CREATE TABLE table_38425 ( "Party" text, "Votes cast" real, "Percentage" real, "Seats won" real, "Percent of seats" real ) ### Response: SELECT "Party" FROM table_38425 WHERE "Seats won" < '21' AND "Percent of seats" = '0' AND "Votes cast" = '69757'
What is the record when they play the canucks and have under 98 points?
CREATE TABLE table_53804 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text, "Arena" text, "Points" real )
SELECT "Record" FROM table_53804 WHERE "Points" < '98' AND "Opponent" = 'canucks'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the record when they play the canucks and have under 98 points? ### Input: CREATE TABLE table_53804 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text, "Arena" text, "Points" real ) ### Response: SELECT "Record" FROM table_53804 WHERE "Points" < '98' AND "Opponent" = 'canucks'
The district North Carolina 10 have what candidates?
CREATE TABLE table_3608 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text )
SELECT "Candidates" FROM table_3608 WHERE "District" = 'North Carolina 10'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: The district North Carolina 10 have what candidates? ### Input: CREATE TABLE table_3608 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) ### Response: SELECT "Candidates" FROM table_3608 WHERE "District" = 'North Carolina 10'
What is the minimum number of members Europe had at the time Africa had 7375139?
CREATE TABLE table_22853 ( "Year" real, "Worldwide" real, "Africa" real, "America" real, "Asia" real, "Australia" real, "Europe" real )
SELECT MIN("Europe") FROM table_22853 WHERE "Africa" = '7375139'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the minimum number of members Europe had at the time Africa had 7375139? ### Input: CREATE TABLE table_22853 ( "Year" real, "Worldwide" real, "Africa" real, "America" real, "Asia" real, "Australia" real, "Europe" real ) ### Response: SELECT MIN("Europe") FROM table_22853 WHERE "Africa" = '7375139'
what number is previous to 13 february 1918 @ 0915 hours ?
CREATE TABLE table_204_353 ( id number, "no." number, "date/time" text, "aircraft" text, "foe" text, "result" text, "location" text, "notes" text )
SELECT "no." FROM table_204_353 WHERE id = (SELECT id FROM table_204_353 WHERE "date/time" = '13 february 1918 @ 0915 hours') - 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number is previous to 13 february 1918 @ 0915 hours ? ### Input: CREATE TABLE table_204_353 ( id number, "no." number, "date/time" text, "aircraft" text, "foe" text, "result" text, "location" text, "notes" text ) ### Response: SELECT "no." FROM table_204_353 WHERE id = (SELECT id FROM table_204_353 WHERE "date/time" = '13 february 1918 @ 0915 hours') - 1