instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_204_937 ( id number, "rank" number, "lane" number, "athlete" text, "time" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who were the only two runners to complete the race in over 54 seconds ?
SELECT "athlete" FROM table_204_937 WHERE "time" > 54
squall
CREATE TABLE table_27902171_8 ( high_assists VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of high asists for 34-27
SELECT COUNT(high_assists) FROM table_27902171_8 WHERE record = "34-27"
sql_create_context
CREATE TABLE table_47595 ( "Rank" text, "Team" text, "Run 1" text, "Run 2" text, "Run 3" text, "Final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rank has final with 5:18.85?
SELECT "Rank" FROM table_47595 WHERE "Final" = '5:18.85'
wikisql
CREATE TABLE table_27340 ( "Shirt No" real, "Nationality" text, "Player" text, "Birth Date" text, "Height" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the height for asko esna
SELECT "Height" FROM table_27340 WHERE "Player" = 'Asko Esna'
wikisql
CREATE TABLE table_name_97 ( season VARCHAR, play_offs VARCHAR, pos VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the season for quarter-final position of 4th
SELECT season FROM table_name_97 WHERE play_offs = "quarter-final" AND pos = "4th"
sql_create_context
CREATE TABLE table_name_24 ( time VARCHAR, name VARCHAR, heat VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Dominik Meichtry's Time in Heat 7 or lower?
SELECT COUNT(time) FROM table_name_24 WHERE name = "dominik meichtry" AND heat < 7
sql_create_context
CREATE TABLE table_78941 ( "City" text, "Country" text, "Airport" text, "IATA" text, "ICAO" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is th IATA for Norway with an ICAO of ENTO?
SELECT "IATA" FROM table_78941 WHERE "Country" = 'norway' AND "ICAO" = 'ento'
wikisql
CREATE TABLE table_38537 ( "Station Code" text, "Station" text, "Arrival" text, "Departure" text, "Kilometers" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's listed for Departure that has 1676 listed for the Kilometers?
SELECT "Departure" FROM table_38537 WHERE "Kilometers" = '1676'
wikisql
CREATE TABLE table_30017 ( "Province" text, "Provincial capital" text, "Commandery" text, "Commandery capital" text, "No. of counties" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When nanhai is the commandery what is the commandery capital?
SELECT "Commandery capital" FROM table_30017 WHERE "Commandery" = 'Nanhai 南海'
wikisql
CREATE TABLE table_23194 ( "Player" text, "Games Played" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many assists did Delisha Milton-Jones make?
SELECT "Assists" FROM table_23194 WHERE "Player" = 'DeLisha Milton-Jones'
wikisql
CREATE TABLE table_train_274 ( "id" int, "gender" string, "serum_bicarbonate" int, "randomization_bg" int, "positive_serum" bool, "diabetic_ketoacidosis" bool, "urinary_ketones" bool, "diastolic_blood_pressure_dbp" int, "heart_rate" int, "body_mass_index_bmi" float, "age" flo...
SELECT * FROM table_train_274 WHERE randomization_bg < 400 AND diabetic_ketoacidosis = 0 OR (serum_bicarbonate < 18 OR positive_serum = 0 OR urinary_ketones = 0)
criteria2sql
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id ...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 598 AND NOT instructor.name LIKE '%Mark Villacorta%' AND offering_instructor.instructor_id = instructor.instructor_id AND of...
advising
CREATE TABLE table_name_97 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In the tie where Southampton was the away team, who was the home team?
SELECT home_team FROM table_name_97 WHERE away_team = "southampton"
sql_create_context
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 t...
SELECT demographic.age, demographic.dob FROM demographic WHERE demographic.name = "John Gartman"
mimicsql_data
CREATE TABLE table_37572 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" real, "2nd (m)" real, "Points" real, "Overall WC points (Rank)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the lowest 1st (m), ranked lower than 8...
SELECT MIN("1st (m)") FROM table_37572 WHERE "Rank" < '8' AND "Overall WC points (Rank)" = '369 (16)' AND "Points" > '258.2'
wikisql
CREATE TABLE table_32710 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the attendance for the game held on January 2, 2005?
SELECT "Attendance" FROM table_32710 WHERE "Date" = 'january 2, 2005'
wikisql
CREATE TABLE table_62353 ( "Name" text, "Hometown" text, "Games" text, "Goals" text, "Assists" text, "Points" text, "Pen. Min." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is John Davis's home town?
SELECT "Hometown" FROM table_62353 WHERE "Name" = 'john davis'
wikisql
CREATE TABLE table_16480 ( "City of license/Market" text, "Station" text, "Channel TV ( DT )" text, "Year of affiliation" text, "Owned since" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What market is KTFK-DT in?
SELECT "City of license/Market" FROM table_16480 WHERE "Station" = 'KTFK-DT'
wikisql
CREATE TABLE Products ( product_id INTEGER, product_details VARCHAR(255) ) CREATE TABLE Order_Items ( order_id INTEGER, product_id INTEGER, order_quantity VARCHAR(15) ) CREATE TABLE Customer_Addresses ( customer_id INTEGER, address_id INTEGER, date_address_from DATETIME, address_ty...
SELECT order_date, COUNT(order_date) FROM Customers AS t1 JOIN Customer_Orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered"
nvbench
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 ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.diagnosis = "ABDOMINAL ABSCESS"
mimicsql_data
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, ...
SELECT demographic.gender, demographic.admittime FROM demographic WHERE demographic.subject_id = "84129"
mimicsql_data
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name
nvbench
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeri...
SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-25029') AND NOT patient.unitdischargetime IS ...
eicu
CREATE TABLE fzzmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZD...
SELECT zzmzjzjlb.JZZDBM, zzmzjzjlb.JZZDSM FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '71329181' UNION SELECT fzzmzjzjlb.JZZDBM, fzzmzjzjlb.JZZDSM FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJGDM = fzzmzjzjlb.YLJGDM AN...
css
CREATE TABLE table_name_39 ( total_apps__sub_ VARCHAR, total_goals VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Total Apps (sub) has 6 goals total?
SELECT total_apps__sub_ FROM table_name_39 WHERE total_goals = "6"
sql_create_context
CREATE TABLE table_name_21 ( week VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What week number had the New York Giants as opponent?
SELECT COUNT(week) FROM table_name_21 WHERE opponent = "new york giants"
sql_create_context
CREATE TABLE Complaints ( complaint_id INTEGER, product_id INTEGER, customer_id INTEGER, complaint_outcome_code VARCHAR(20), complaint_status_code VARCHAR(20), complaint_type_code VARCHAR(20), date_complaint_raised DATETIME, date_complaint_closed DATETIME, staff_id INTEGER ) CREATE ...
SELECT product_category_code, AVG(product_price) FROM Products GROUP BY product_category_code
nvbench
CREATE TABLE table_14710984_2 ( young_rider_classification VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was awarded the young ride classification leader when the winner was Marzio Bruseghin?
SELECT young_rider_classification FROM table_14710984_2 WHERE winner = "Marzio Bruseghin"
sql_create_context
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, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2203" AND procedures.icd9_code = "3972"
mimicsql_data
CREATE TABLE table_name_87 ( no_of_channels VARCHAR, transmission VARCHAR, provider VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many analogue satellite channels does Sky [Analogue] have?
SELECT no_of_channels FROM table_name_87 WHERE transmission = "analogue satellite" AND provider = "sky [analogue]"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number...
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-95228' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient....
eicu
CREATE TABLE table_203_358 ( id number, "pos." number, "athlete" text, "run 1" number, "run 2" number, "total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total time of each of the athletes ?
SELECT "total" FROM table_203_358
squall
CREATE TABLE table_name_17 ( total INTEGER, to_par INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Total has a To par larger than 12?
SELECT MIN(total) FROM table_name_17 WHERE to_par > 12
sql_create_context
CREATE TABLE gsi ( course_offering_id int, student_id 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 requirement (...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.friday = 'N' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'FA' ...
advising
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 t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "SYRINGENS" AND lab.fluid = "Other Body Fluid"
mimicsql_data
CREATE TABLE table_16117 ( "No." real, "#" real, "Title" text, "Director" text, "Writer" text, "US air date" text, "Storyteller" text, "Villains" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many villians were in No. 25?
SELECT COUNT("Villains") FROM table_16117 WHERE "No." = '25'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, ...
SELECT mzjzjlb.JZJSSJ FROM mzjzjlb WHERE mzjzjlb.JZLSH = '34024998197'
css
CREATE TABLE table_203_220 ( id number, "outcome" text, "no." number, "date" text, "tournament" text, "surface" text, "opponent in the final" text, "score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many games did she play in 200...
SELECT COUNT("tournament") FROM table_203_220 WHERE "date" = 2002
squall
CREATE TABLE table_name_6 ( shell__lb_ VARCHAR, time_to_ft__m__at_40°__seconds_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the weight of the shell that reached its maximum height at 40 in 12.6 seconds?
SELECT shell__lb_ FROM table_name_6 WHERE time_to_ft__m__at_40°__seconds_ = 12.6
sql_create_context
CREATE TABLE table_name_53 ( h___a VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Was the semi-final round held at home or away?
SELECT h___a FROM table_name_53 WHERE round = "semi-final"
sql_create_context
CREATE TABLE table_204_550 ( id number, "event" text, "record" text, "athlete" text, "date" text, "meet" text, "place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who holds the top record in the 110 m hurdles ?
SELECT "athlete" FROM table_204_550 WHERE "event" = '110 m hurdles'
squall
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_p...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Critical Approaches to Literature%' OR course.description LIKE '%Critical Approaches to Literatu...
advising
CREATE TABLE Acceptance ( Submission_ID int, Workshop_ID int, Result text ) CREATE TABLE submission ( Submission_ID int, Scores real, Author text, College text ) CREATE TABLE workshop ( Workshop_ID int, Date text, Venue text, Name text ) -- Using valid SQLite, answer the ...
SELECT Venue, COUNT(Venue) FROM workshop GROUP BY Venue ORDER BY COUNT(Venue)
nvbench
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.state_code = 'DC' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SALT LAKE ...
atis
CREATE TABLE table_name_47 ( starts VARCHAR, driver VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total starts with more points than 1 and the driver is Nasser Al-Attiyah?
SELECT COUNT(starts) FROM table_name_47 WHERE driver = "nasser al-attiyah" AND points > 1
sql_create_context
CREATE TABLE table_865 ( "Year (Ceremony)" text, "Film title" text, "Language(s)" text, "Director" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year featured the film tsotsi?
SELECT "Year (Ceremony)" FROM table_865 WHERE "Film title" = 'Tsotsi'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title 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 t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Regional enteritis NOS" AND prescriptions.route = "LEFT EYE"
mimicsql_data
CREATE TABLE table_25118909_3 ( _number INTEGER, former_school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most number for notre dame prep
SELECT MAX(_number) FROM table_25118909_3 WHERE former_school = "Notre Dame Prep"
sql_create_context
CREATE TABLE table_43137 ( "Name" text, "League Goals" real, "FA Cup Goals" real, "FL Cup Goals" real, "Other Goals" real, "Total" real, "Career" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average FA Cup Goal value for player...
SELECT AVG("FA Cup Goals") FROM table_43137 WHERE "Other Goals" = '0' AND "FL Cup Goals" = '0' AND "League Goals" < '39'
wikisql
CREATE TABLE table_17580 ( "Season" text, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the womens singles winnerwhen the mens doubl...
SELECT "Womens singles" FROM table_17580 WHERE "Mens doubles" = 'Stefan Karlsson Claes Nordin , BK Aura GBK'
wikisql
CREATE TABLE table_name_36 ( opponent VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent on January 7?
SELECT opponent FROM table_name_36 WHERE date = "january 7"
sql_create_context
CREATE TABLE table_40765 ( "Season" real, "Venue" text, "Teams" real, "Drivers" real, "Champion" text, "Second" text, "Third" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of season when the venue was donington park, and Bra...
SELECT SUM("Season") FROM table_40765 WHERE "Venue" = 'donington park' AND "Second" = 'brazil'
wikisql
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 demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "NEWBORN" AND lab.itemid = "51276"
mimicsql_data
CREATE TABLE table_name_93 ( rank VARCHAR, year VARCHAR, chassis VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rank did the dallara chassis finish in 2000?
SELECT rank FROM table_name_93 WHERE year = "2000" AND chassis = "dallara"
sql_create_context
CREATE TABLE table_34216 ( "Player" text, "Position" text, "Games started" text, "Hometown" text, "Height" text, "Weight" real, "Class" text, "Previous experience" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Player of herbert s. grave...
SELECT "Position" FROM table_34216 WHERE "Player" = 'herbert s. graver'
wikisql
CREATE TABLE table_64993 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Matches" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Matches have a Tally of 1-38?
SELECT "Matches" FROM table_64993 WHERE "Tally" = '1-38'
wikisql
CREATE TABLE nurse ( employeeid number, name text, position text, registered boolean, ssn number ) CREATE TABLE appointment ( appointmentid number, patient number, prepnurse number, physician number, start time, end time, examinationroom text ) CREATE TABLE undergoes ( ...
SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.employeeid = T2.physician JOIN department AS T3 ON T2.department = T3.departmentid WHERE T2.primaryaffiliation = 1
spider
CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int ) -- Using valid SQLite, answer the following que...
SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee ORDER BY Nominee DESC
nvbench
CREATE TABLE table_name_79 ( organisation VARCHAR, nominated_work_title VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the organisation when the nominated work title is n/a in the year 2005?
SELECT organisation FROM table_name_79 WHERE nominated_work_title = "n/a" AND year = 2005
sql_create_context
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NASHVILLE' AND date_day.day_number = 25 AND date_day.month_number = 6 AN...
atis
CREATE TABLE table_48007 ( "Position" real, "Team" text, "Played" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Difference" text, "Points 1" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ...
SELECT "Goal Difference" FROM table_48007 WHERE "Goals Against" < '54' AND "Goals For" > '51' AND "Points 1" = '63'
wikisql
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(...
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(DEPARTMENT_ID) DESC
nvbench
CREATE TABLE table_41896 ( "Name" text, "Level" real, "Digits" real, "Average size (square miles)" text, "Number of HUs (approximate)" real, "Example name" text, "Example code (HUC)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the...
SELECT AVG("Level") FROM table_41896 WHERE "Example name" = 'lower snake' AND "Number of HUs (approximate)" < '370'
wikisql
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT Team_ID, All_Games_Percent FROM basketball_match GROUP BY ACC_Regular_Season
nvbench
CREATE TABLE table_54098 ( "World Rank" real, "Rank (Pakistan)" real, "Name" text, "Height (m)" real, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Rank (Pakistan) of the mountain that has a World Rank smaller than 11 and a H...
SELECT COUNT("Rank (Pakistan)") FROM table_54098 WHERE "World Rank" < '11' AND "Height (m)" < '8126'
wikisql
CREATE TABLE table_70720 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country has a To par of e?
SELECT "Country" FROM table_70720 WHERE "To par" = 'e'
wikisql
CREATE TABLE table_name_98 ( tournament VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Tournament was on 2 October 2006?
SELECT tournament FROM table_name_98 WHERE date = "2 october 2006"
sql_create_context
CREATE TABLE table_2668387_18 ( result VARCHAR, candidates VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the result for walter jones (dr) 99.0% henry lee (f) 1.0%
SELECT result FROM table_2668387_18 WHERE candidates = "Walter Jones (DR) 99.0% Henry Lee (F) 1.0%"
sql_create_context
CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE field ( fieldid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE paper ( paperid int, title varchar, venueid ...
SELECT DISTINCT paper.paperid FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'ictd'
scholar
CREATE TABLE table_31578 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the date of stade des martyrs, dr congo
SELECT "Date" FROM table_31578 WHERE "Venue" = 'stade des martyrs, dr congo'
wikisql
CREATE TABLE table_36480 ( "Position" real, "Sail number" text, "Yacht" text, "State/country" text, "Yacht type" text, "LOA (Metres)" real, "Skipper" text, "Corrected time d:hh:mm:ss" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHICH ...
SELECT "Yacht type" FROM table_36480 WHERE "Corrected time d:hh:mm:ss" = '2:13:04:48'
wikisql
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 varch...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE (course.number = 398 OR course.number = 498 OR course.number = 598) AND course.department = 'E...
advising
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE hz_info ( KH text, KLX number...
SELECT mzjzjlb.SG, mzjzjlb.TZ FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '82545528'
css
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 comment_instructor ( instructor_id int, student_id int, score int, ...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM progra...
advising
CREATE TABLE table_14724369_1 ( title VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which title had the production code 1ACX04?
SELECT title FROM table_14724369_1 WHERE production_code = "1ACX04"
sql_create_context
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDBM = 'I65.176' AND jyjgzbb.JCZBDM = '643141'
css
CREATE TABLE table_name_65 ( match INTEGER, home_away VARCHAR, opponent_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average match when the singapore armed forces played away against perak fa (malaysia)?
SELECT AVG(match) FROM table_name_65 WHERE home_away = "away" AND opponent_team = "perak fa (malaysia)"
sql_create_context
CREATE TABLE table_70420 ( "Name" text, "Born" text, "Age at first step" text, "Mission" text, "Lunar EVA dates" text, "Service" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The Apollo astronaut who was 38y 9m 7d when first stepping on the moo...
SELECT "Born" FROM table_70420 WHERE "Age at first step" = '38y 9m 7d'
wikisql
CREATE TABLE table_name_62 ( source VARCHAR, cartridge VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Source, when Cartridge is .375 remington ultra magnum?
SELECT source FROM table_name_62 WHERE cartridge = ".375 remington ultra magnum"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD ...
SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7826174' AND t_kc21.IN_HOSP_DATE BETWEEN '2006-12-24' AND '2014-02-10' AND t_kc21.CLINIC_TYPE = '住院'
css
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T2.Revenue DESC
nvbench
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, fligh...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DAL...
atis
CREATE TABLE table_200_3 ( id number, "year" number, "winner" text, "jockey" text, "trainer" text, "owner" text, "breeder" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the first year there was a triple crown winner ?
SELECT MIN("year") FROM table_200_3
squall
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id num...
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27964)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'a...
mimic_iii
CREATE TABLE table_63719 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is district has a name of Rajnagar?
SELECT "District" FROM table_63719 WHERE "Name" = 'rajnagar'
wikisql
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 ) C...
SELECT demographic.name FROM demographic WHERE demographic.subject_id = "3284"
mimicsql_data
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '68061275' AND t_kc21.IN_HOSP_DATE BETWEEN '2004-10-02' AND '2005-07-28' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE table_41663 ( "20 years" text, "2400 kWh/kW p y" real, "2200 kWh/kW p y" real, "2000 kWh/kW p y" real, "1800 kWh/kW p y" real, "1600 kWh/kW p y" real, "1400 kWh/kW p y" real, "1200 kWh/kW p y" real, "1000 kWh/kW p y" real, "800 kWh/kW p y" real ) -- Using valid SQL...
SELECT COUNT("1800 kWh/kW p y") FROM table_41663 WHERE "1600 kWh/kW p y" = '8.8' AND "1200 kWh/kW p y" > '11.7'
wikisql
CREATE TABLE table_3023 ( "Conference" text, "Regular Season Winner" text, "Conference Player of the Year" text, "Conference Tournament" text, "Tournament Venue (City)" text, "Tournament Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who...
SELECT "Tournament Winner" FROM table_3023 WHERE "Regular Season Winner" = 'UNC Wilmington'
wikisql
CREATE TABLE table_8471 ( "South or west terminus" text, "North or east terminus" text, "First year" real, "Final year" real, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most minimal Final year that has a North or east end of ...
SELECT MIN("Final year") FROM table_8471 WHERE "North or east terminus" = 'covington'
wikisql
CREATE TABLE table_52366 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the home team in the game where the away...
SELECT "Home team" FROM table_52366 WHERE "Away team score" = '14.19 (103)'
wikisql
CREATE TABLE table_name_90 ( gold INTEGER, bronze VARCHAR, total VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average gold total for nations ranked 6 with 1 total medal and 1 bronze medal?
SELECT AVG(gold) FROM table_name_90 WHERE total = 1 AND rank = "6" AND bronze > 1
sql_create_context
CREATE TABLE table_15933 ( "State/Territory" text, "Asian American Population (2010 Census)" real, "Chinese" real, "Filipino" real, "Indian" real, "Japanese" real, "Korean" real, "Vietnamese" real, "Other Asian" real ) -- Using valid SQLite, answer the following questions for the t...
SELECT MIN("Chinese") FROM table_15933 WHERE "Filipino" = '1474707'
wikisql
CREATE TABLE table_name_54 ( attendance VARCHAR, score VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people were in attendance when the Washington Nationals had a score of 7-3 and a loss of Worrell (0-1)?
SELECT COUNT(attendance) FROM table_name_54 WHERE score = "7-3" AND loss = "worrell (0-1)"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate n...
SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND STRFTIME('%y', lab.labresulttime) = '2105' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 4
eicu
CREATE TABLE table_12261714_2 ( intergiro_classification VARCHAR, stage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many leaders are there in the intergiro classification in stage 20?
SELECT COUNT(intergiro_classification) FROM table_12261714_2 WHERE stage = "20"
sql_create_context
CREATE TABLE table_28540539_2 ( version VARCHAR, release VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the number of the 1.0.9 release version?
SELECT COUNT(version) FROM table_28540539_2 WHERE release = "1.0.9"
sql_create_context
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, ...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age >= 60) ...
mimic_iii
CREATE TABLE table_54181 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is melbourne's away score?
SELECT "Away team score" FROM table_54181 WHERE "Away team" = 'melbourne'
wikisql
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 diagnosis ( diagn...
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI...
eicu