instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_203_538 ( id number, "flight" text, "date" text, "payload nickname" text, "payload" text, "orbit" text, "result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what h ii flight took place last ?
SELECT "flight" FROM table_203_538 ORDER BY "date" DESC LIMIT 1
squall
CREATE TABLE table_12887260_1 ( main_developer VARCHAR, first_release VARCHAR, console VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which main developer made their first release in 1991 and created the Mega Drive/Genesis console?
SELECT main_developer FROM table_12887260_1 WHERE first_release = 1991 AND console = "Mega Drive/Genesis"
sql_create_context
CREATE TABLE table_8055 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Falcons points" real, "Opponents" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the opponent with 16 points?
SELECT "Opponent" FROM table_8055 WHERE "Opponents" = '16'
wikisql
CREATE TABLE table_25724294_2 ( extra_points VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Jack Loell had how many extra points?
SELECT extra_points FROM table_25724294_2 WHERE player = "Jack Loell"
sql_create_context
CREATE TABLE table_17751942_4 ( final_losses VARCHAR, Semi INTEGER, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of semi-final losses for the Kitchener Rangers?
SELECT MAX(Semi) - final_losses FROM table_17751942_4 WHERE team = "Kitchener Rangers"
sql_create_context
CREATE TABLE zyjzjlb_jybgb ( YLJGDM_ZYJZJLB text, BGDH number, YLJGDM number ) 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 n...
SELECT COUNT(*) FROM jybgb WHERE jybgb.YLJGDM = '4874392' AND jybgb.BGRQ BETWEEN '2006-01-26' AND '2013-01-28'
css
CREATE TABLE table_1133844_4 ( senator VARCHAR, state__linked_to_summaries_below_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who won the senate seat in arkansas
SELECT senator FROM table_1133844_4 WHERE state__linked_to_summaries_below_ = "Arkansas"
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "41" AND lab.fluid = "Pleural"
mimicsql_data
CREATE TABLE table_68437 ( "Season" real, "Date" text, "Location" text, "Race" text, "Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What place result was the 1996 season at Lake Louise, Canada?
SELECT "Place" FROM table_68437 WHERE "Season" = '1996' AND "Location" = 'lake louise, canada'
wikisql
CREATE TABLE table_33869 ( "Rank" text, "Player" text, "Goals" text, "Assists" text, "Points" text, "Years" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What years had players who scored 36 goals?
SELECT "Years" FROM table_33869 WHERE "Goals" = '36'
wikisql
CREATE TABLE table_name_8 ( source VARCHAR, date VARCHAR, race_winners VARCHAR, gp_winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What source has a race winner of ben adriaenssen / ben van den bogaart, and the gp winner of ben adriaenssen / be...
SELECT source FROM table_name_8 WHERE race_winners = "ben adriaenssen / ben van den bogaart" AND gp_winner = "ben adriaenssen / ben van den bogaart" AND date = "1 april"
sql_create_context
CREATE TABLE table_204_23 ( id number, "#" number, "wrestlers" text, "reign" number, "date" text, "days held" number, "location" text, "event" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total days held o...
SELECT "days held" FROM table_204_23 WHERE "#" = 1
squall
CREATE TABLE table_name_88 ( length VARCHAR, track VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lengtho f track 16?
SELECT length FROM table_name_88 WHERE track = "16"
sql_create_context
CREATE TABLE table_62276 ( "Year" real, "Award" text, "Category" text, "Nominee" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Category, when Result is 'Nominated', when Award is 'Drama Desk Award', and when Nominee is 'Natha...
SELECT "Category" FROM table_62276 WHERE "Result" = 'nominated' AND "Award" = 'drama desk award' AND "Nominee" = 'nathan lane'
wikisql
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 ) CREATE TABLE PostLin...
SELECT Id AS "post_link", FavoriteCount, Score, CreationDate FROM Posts WHERE (PostTypeId = 1) AND (NOT ClosedDate IS NULL) AND (FavoriteCount > 0) ORDER BY CreationDate DESC
sede
CREATE TABLE table_name_24 ( rank INTEGER, gross VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Rank is the lowest one that has a Gross of $54,215,416?
SELECT MIN(rank) FROM table_name_24 WHERE gross = "$54,215,416"
sql_create_context
CREATE TABLE table_204_123 ( id number, "week" number, "date" text, "kickoff" text, "opponent" text, "results\nfinal score" text, "results\nteam record" text, "game site" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT "opponent" FROM table_204_123 ORDER BY "results\nfinal score" LIMIT 1
squall
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb...
css
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airlin...
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 = 'MILWAUKEE' AND date_day.day_number = 23 AND date_day.month_number = 4 AND...
atis
CREATE TABLE table_23331 ( "District" real, "Representative" text, "Party" text, "Residence" text, "Counties represented" text, "Term ends" real, "First Elected" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the district for newtown sq...
SELECT MIN("District") FROM table_23331 WHERE "Residence" = 'Newtown Square'
wikisql
CREATE TABLE table_name_59 ( win__percentage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHat in 2005 has a Win % of 82.61?
SELECT 2005 FROM table_name_59 WHERE win__percentage = "82.61"
sql_create_context
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.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND se...
advising
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE gsi ( c...
SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND c...
advising
CREATE TABLE table_73674 ( "Club" text, "Home city" text, "Stadium" text, "First season in the Serie A" real, "First season in current spell" real, "Last title" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the last title for cuenca
SELECT "Last title" FROM table_73674 WHERE "Home city" = 'Cuenca'
wikisql
CREATE TABLE has_amenity ( dormid VARCHAR, amenid VARCHAR ) CREATE TABLE dorm_amenity ( amenid VARCHAR, amenity_name VARCHAR ) CREATE TABLE dorm ( dorm_name VARCHAR, dormid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of dor...
SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3...
sql_create_context
CREATE TABLE table_78228 ( "Peak" text, "Height (m)" real, "Prom. (m)" real, "Class" text, "Parent" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest height for Parent grasmoor when it has a Prom larger than 117?
SELECT MIN("Height (m)") FROM table_78228 WHERE "Parent" = 'grasmoor' AND "Prom. (m)" > '117'
wikisql
CREATE TABLE table_name_52 ( away_team VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Collingwood was the home team who was the opposing away team?
SELECT away_team FROM table_name_52 WHERE home_team = "collingwood"
sql_create_context
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_co...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_...
mimic_iii
CREATE TABLE table_38815 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the attendance for july 18?
SELECT COUNT("Attendance") FROM table_38815 WHERE "Date" = 'july 18'
wikisql
CREATE TABLE table_name_73 ( original_title VARCHAR, director VARCHAR, film_title_used_in_nomination VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Original Title, when Director is 'Ting Shan-Si', and when Film Title Used In Nomination is 'Th...
SELECT original_title FROM table_name_73 WHERE director = "ting shan-si" AND film_title_used_in_nomination = "the 800 heroes"
sql_create_context
CREATE TABLE table_20400 ( "Player" text, "Matches" real, "Overs" text, "Maidens" real, "Runs" real, "Wickets" real, "Average" text, "Economy" text, "5w" real, "10w" real, "Best Bowling" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT MAX("Maidens") FROM table_20400 WHERE "Best Bowling" = '1/13'
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.formulary_drug_cd = "BAG"
mimicsql_data
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program ( program_id int, name varchar, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program...
advising
CREATE TABLE table_40305 ( "Year" real, "Award" text, "Result" text, "Category" text, "Film" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was awarded after 1947 in the category of, the best actor in a leading role?
SELECT "Award" FROM table_40305 WHERE "Year" > '1947' AND "Category" = 'best actor in a leading role'
wikisql
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 jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_...
SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID)
nvbench
CREATE TABLE table_2668374_18 ( incumbent VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the incumbent in Virginia 3?
SELECT incumbent FROM table_2668374_18 WHERE district = "Virginia 3"
sql_create_context
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 T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
nvbench
CREATE TABLE table_name_25 ( date VARCHAR, game_site VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did they play at Candlestick Park?
SELECT date FROM table_name_25 WHERE game_site = "candlestick park"
sql_create_context
CREATE TABLE table_name_74 ( viewers__millions_ INTEGER, episode__number VARCHAR, rating VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of million viewers for an episode before episode 5 with a rating/share of 1.1/3?
SELECT MIN(viewers__millions_) FROM table_name_74 WHERE rating / SHARE(18 AS –49) = 1.1 / 3 AND episode__number < 5
sql_create_context
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer...
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 = 'TORONTO' AND date_day.day_number = 24 AND date_day.month_number = 5 AND...
atis
CREATE TABLE table_49340 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Date that has the Week smaller than 13, and the Opponent of green bay packers?
SELECT "Date" FROM table_49340 WHERE "Week" < '13' AND "Opponent" = 'green bay packers'
wikisql
CREATE TABLE table_name_55 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score on October 24, 2005?
SELECT score FROM table_name_55 WHERE date = "october 24, 2005"
sql_create_context
CREATE TABLE table_21830 ( "Year" real, "Network" text, "Play-by-play" text, "Colour commentator(s)" text, "Sideline reporters" text, "Pregame host" text, "Pregame analysts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different p...
SELECT COUNT("Play-by-play") FROM table_21830 WHERE "Pregame analysts" = 'Darren Flutie, Eric Tillman and Greg Frers'
wikisql
CREATE TABLE table_17994 ( "Year" real, "Competition" text, "Location" text, "Event" text, "Final-Rank" text, "Final-Score" text, "Qualifying Rank" real, "Qualifying Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the lowes...
SELECT MIN("Qualifying Rank") FROM table_17994
wikisql
CREATE TABLE table_26150 ( "Copper Age" text, "Chalcolithic (4500 BC - 3300 BC)" text, "Early Chalcolithic" text, "4500 BC - 4000 BC" text, "Ubaid period in Mesopotamia" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When hittite middle kingdom , ne...
SELECT COUNT("Early Chalcolithic") FROM table_26150 WHERE "Ubaid period in Mesopotamia" = 'Hittite Middle Kingdom , New Kingdom of Egypt'
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 medication ( medi...
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '010-16627' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '010-16627' AND patient.hospitaldischargetime IS NULL)) AND tr...
eicu
CREATE TABLE table_79832 ( "Place" real, "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals Scored" real, "Goals Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the number of goals conceded that...
SELECT COUNT("Goals Conceded") FROM table_79832 WHERE "Played" > '18'
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_name_34 ( losses VARCHAR, awards VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the losses where the award is Mike Miller (Smoy)?
SELECT losses FROM table_name_34 WHERE awards = "mike miller (smoy)"
sql_create_context
CREATE TABLE table_train_258 ( "id" int, "gender" string, "autoimmune_disease" bool, "renal_disease" bool, "hepatic_disease" bool, "immune_deficiency_disorder" bool, "active_hepatitis" bool, "body_mass_index_bmi" float, "NOUSE" float ) -- Using valid SQLite, answer the following qu...
SELECT * FROM table_train_258 WHERE renal_disease = 1
criteria2sql
CREATE TABLE table_27330 ( "Region" text, "Public network" text, "Own/community generator" text, "Solar panel" text, "Other source" text, "None" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many regions have 0.5% solar panels?
SELECT COUNT("Public network") FROM table_27330 WHERE "Solar panel" = '0.5%'
wikisql
CREATE TABLE table_name_19 ( rank VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rank is the airport in Fortaleza?
SELECT rank FROM table_name_19 WHERE location = "fortaleza"
sql_create_context
CREATE TABLE table_name_17 ( race VARCHAR, athlete VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the race when Lineth Chepkurui is the athlete?
SELECT race FROM table_name_17 WHERE athlete = "lineth chepkurui"
sql_create_context
CREATE TABLE table_64272 ( "Model number" text, "sSpec number" text, "Cores" text, "Frequency" text, "Turbo" text, "L2 cache" text, "L3 cache" text, "GPU model" text, "GPU frequency" text, "Socket" text, "I/O bus" text, "Release date" text, "Part number(s)" text, ...
SELECT "Socket" FROM table_64272 WHERE "Release price ( USD )" = '$378' AND "Turbo" = '6/6/8/9'
wikisql
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
SELECT COUNT(*) FROM zyjzjlb WHERE YLJGDM = '9624712' AND JZKSDM = '1153' AND RYDJSJ BETWEEN '2012-07-05' AND '2019-09-09'
css
CREATE TABLE table_37749 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest round number for Dan Connor, the player?
SELECT MAX("Round") FROM table_37749 WHERE "Player" = 'dan connor'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(qtb.PERSON_ID) FROM qtb WHERE qtb.IN_DIAG_DIS_NM = '酒精依赖综合征' UNION SELECT COUNT(gyb.PERSON_ID) FROM gyb WHERE gyb.IN_DIAG_DIS_NM = '酒精依赖综合征' UNION SELECT COUNT(zyb.PERSON_ID) FROM zyb WHERE zyb.IN_DIAG_DIS_NM = '酒精依赖综合征' UNION SELECT COUNT(mzb.PERSON_ID) FROM mzb WHERE mzb.IN_DIAG_DIS_NM = '酒精依赖综合征'
css
CREATE TABLE table_34689 ( "Name" text, "Born \u2013 Died" text, "Notable for" text, "Connection with Australia" text, "Connection with America" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the person born in Australia, rick springfield no...
SELECT "Notable for" FROM table_34689 WHERE "Connection with Australia" = 'born in australia' AND "Name" = 'rick springfield'
wikisql
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 demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2182" AND lab.fluid = "Blood"
mimicsql_data
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 ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.diagnosis = "SEPSIS"
mimicsql_data
CREATE TABLE table_21980_1 ( january__°f_ VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the January ( F) temperatures in the Corner Brook location?
SELECT january__°f_ FROM table_21980_1 WHERE location = "Corner Brook"
sql_create_context
CREATE TABLE manager ( Age INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average age for all managers?
SELECT AVG(Age) FROM manager
sql_create_context
CREATE TABLE table_name_96 ( time_retired VARCHAR, laps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the time/retired when the laps is 55?
SELECT time_retired FROM table_name_96 WHERE laps = 55
sql_create_context
CREATE TABLE greatermanchestercrime ( crimeid text, crimets time, location text, lsoa text, type text, outcome text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which location has the top amount of 'Drugs' crime conducted?
SELECT location FROM greatermanchestercrime WHERE type LIKE "%Drug%" GROUP BY location ORDER BY COUNT(*) DESC LIMIT 1
greatermanchestercrime
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 ReviewRejectionReasons ( Id number, N...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Age, Location, WebsiteUrl AS Wesbite, LastAccessDate AS Seen, CreationDate FROM Users WHERE Reputation >= '##MinimalReputation:int?1##' AND (UPPER(Location) LIKE UPPER('%Algeria%') OR UPPER(Location) LIKE UPPER('%Algerie%') OR UP...
sede
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE icustays ( row_id number, ...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'tpn d11.5' AND d_it...
mimic_iii
CREATE TABLE table_31495 ( "Townland" text, "Area( acres )" real, "Barony" text, "Civil parish" text, "Poor law union" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fewest area in Derrynanool townland?
SELECT MIN("Area( acres )") FROM table_31495 WHERE "Townland" = 'Derrynanool'
wikisql
CREATE TABLE table_16724844_1 ( mens_u20 VARCHAR, womens_40 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times was the mens u20 recorded when the Womens 40 were Sydney Scorpions def North Queensland Cyclones?
SELECT COUNT(mens_u20) FROM table_16724844_1 WHERE womens_40 = "Sydney Scorpions def North Queensland Cyclones"
sql_create_context
CREATE TABLE table_60903 ( "Stage" text, "Route" text, "Distance" text, "Date" text, "Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the winner of the mechelen > mechelen route?
SELECT "Winner" FROM table_60903 WHERE "Route" = 'mechelen > mechelen'
wikisql
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellv...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-4486')) AND medication.drugname IN ('morphine 4 mg/ml syringe : 1 ml s...
eicu
CREATE TABLE table_61154 ( "7:00 am" text, "7:30 am" text, "8:00 am" text, "9:00 am" text, "11:00 am" text, "noon" text, "12:30 pm" text, "1:00 pm" text, "1:30 pm" text, "2:00 pm" text, "3:00 pm" text, "3:30 pm" text, "4:00 pm" text, "4:30 pm" text, "5:00 pm" ...
SELECT "4:30 pm" FROM table_61154 WHERE "noon" = 'local programs' AND "11:00 am" = 'local programs'
wikisql
CREATE TABLE table_name_95 ( position VARCHAR, notes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position did the person finish in with a notes of junior men individual 5.64km?
SELECT position FROM table_name_95 WHERE notes = "junior men individual 5.64km"
sql_create_context
CREATE TABLE table_1378 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes ...
SELECT COUNT("Production code") FROM table_1378 WHERE "Written by" = 'Jack Burditt & Robert Carlock'
wikisql
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 text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.PERSON_NM = '褚子琪' AND t_kc21.CLINIC_TYPE = '住院' AND MOD(t_kc21.MED_AMOUT, 1) = 0
css
CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, ...
SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.YLJGDM = '8183928' AND mzjzjlb.JZKSRQ BETWEEN '2004-05-16' AND '2020-12-13' AND mzjzjlb.ZZBZ > 0
css
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybg...
css
CREATE TABLE table_27953 ( "meas. num" real, "passed" text, "YES votes" real, "NO votes" real, "% YES" text, "Const. Amd.?" text, "type" text, "description" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the type of ballot measu...
SELECT "type" FROM table_27953 WHERE "description" = 'Department of Industry and Public Works Amendment'
wikisql
CREATE TABLE table_2093995_1 ( parking VARCHAR, city__neighborhood VARCHAR, stations VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much parking is in Van Nuys at the Sepulveda station?
SELECT parking FROM table_2093995_1 WHERE city__neighborhood = "Van Nuys" AND stations = "Sepulveda"
sql_create_context
CREATE TABLE volume ( volume_id number, volume_issue text, issue_date text, weeks_on_top number, song text, artist_id number ) CREATE TABLE artist ( artist_id number, artist text, age number, famous_title text, famous_release_date text ) CREATE TABLE music_festival ( id...
SELECT famous_title, age FROM artist ORDER BY age DESC
spider
CREATE TABLE table_name_92 ( laps INTEGER, grid VARCHAR, manufacturer VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average number of laps completed by KTM riders, with times of +56.440 and grid values under 11?
SELECT AVG(laps) FROM table_name_92 WHERE manufacturer = "ktm" AND time_retired = "+56.440" AND grid < 11
sql_create_context
CREATE TABLE table_name_80 ( network VARCHAR, premiere VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the network for 13 january 2009
SELECT network FROM table_name_80 WHERE premiere = "13 january 2009"
sql_create_context
CREATE TABLE table_name_27 ( website VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the website for the yamagata international documentary film festival?
SELECT website FROM table_name_27 WHERE name = "yamagata international documentary film festival"
sql_create_context
CREATE TABLE table_name_74 ( replaced_by VARCHAR, date_of_appointment VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the person that was appointed on 13 May 2009?
SELECT replaced_by FROM table_name_74 WHERE date_of_appointment = "13 may 2009"
sql_create_context
CREATE TABLE table_10284 ( "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. -- Which away team's Venue is western oval?
SELECT "Away team" FROM table_10284 WHERE "Venue" = 'western oval'
wikisql
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "62" AND diagnoses.short_title = "Esophageal reflux"
mimicsql_data
CREATE TABLE table_name_32 ( image_quality VARCHAR, date VARCHAR, multiple_sessions VARCHAR, authentication VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the image quality when the multiple sessions is x, the authentication is and the date i...
SELECT image_quality FROM table_name_32 WHERE multiple_sessions = "x" AND authentication = "✓" AND date = "may 15, 2007"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, d...
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-4674')) AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIM...
eicu
CREATE TABLE table_name_83 ( race VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who holds the time of 17:11.572?
SELECT race FROM table_name_83 WHERE time = "17:11.572"
sql_create_context
CREATE TABLE table_3099 ( "No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed 'hey now hey no...
SELECT "Directed by" FROM table_3099 WHERE "Title" = 'Hey Now Hey Now Perry''s Girlfriend''s Back'
wikisql
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 ) CREAT...
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-31236')) AND STRFTIME('%y', treatment.treatmenttime) = '2101'...
eicu
CREATE TABLE table_22517 ( "Number" real, "Sanskrit" text, "International Alphabet of Sanskrit Transliteration" text, "Sanskrit gloss" text, "Western name" text, "Greek" text, "Gloss" text, "Tattva (Element)" text, "Quality" text, "Ruling Planet" text ) -- Using valid SQLite, a...
SELECT "Gloss" FROM table_22517 WHERE "International Alphabet of Sanskrit Transliteration" = 'Kumbha'
wikisql
CREATE TABLE table_60214 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( \u00a3 )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much money does the player with a 68-67-69-71=275 score have?
SELECT "Money ( \u00a3 )" FROM table_60214 WHERE "Score" = '68-67-69-71=275'
wikisql
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, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE...
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27038 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)
mimic_iii
CREATE TABLE table_13632 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Rank has a Player of matt ruth?
SELECT SUM("Rank") FROM table_13632 WHERE "Player" = 'matt ruth'
wikisql
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 text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc21_t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '卫祺祥' AND t_kc21.MED_SER_ORG_NO = '1070682') ORDER BY t_kc22.UNIVALENT DESC LIMIT 1
css
CREATE TABLE table_16703 ( "Year" real, "Winners" text, "Grand Finalist" text, "Scores" text, "Venue" text, "Crowd" real, "Margin" real, "Season Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the venue where the scores ar...
SELECT "Venue" FROM table_16703 WHERE "Scores" = '15.13 (103) – 8.4 (52)'
wikisql
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT SUM(MED_AMOUT) FROM t_kc21 WHERE PERSON_NM = '陶成化' AND CLINIC_TYPE = '门诊'
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH te...
SELECT COUNT(*) FROM mzjzjlb JOIN hz_info_mzjzjlb JOIN hz_info ON hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.mzjzjlb_id = mzjzjlb.mzjzjlb_id AND hz_info_mzjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '61...
css
CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Lots ( lot_id INTEGER, investor_id INTEGER, lot_details VARCHAR(255) ) CREATE TABLE Sales ( sales_transaction_id INTEGER, sales_details VARCHAR(255) ) CREATE TABLE Ref_Transaction_Types ...
SELECT lot_details, COUNT(lot_details) FROM Investors AS T1 JOIN Lots AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" GROUP BY lot_details ORDER BY COUNT(lot_details) DESC
nvbench
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, H...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '94819953' AND t_kc22.STA_DATE BETWEEN '2018-06-26' AND '2018-10-05' AND t_kc22.SELF_PAY_AMO > 1549.15
css