instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_75628 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of field goals scored b...
SELECT AVG("Field goals") FROM table_75628 WHERE "Position" = 'right halfback' AND "Touchdowns" > '3'
wikisql
CREATE TABLE table_79152 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many strokes off par was the winner in 1978?
SELECT "To par" FROM table_79152 WHERE "Year(s) won" = '1978'
wikisql
CREATE TABLE table_16604 ( "Date" text, "Founder" text, "Extroversion Scales" text, "People-task orientation scale" text, "Introverted, Task-Oriented" text, "Extroverted, Task-Oriented" text, "Extroverted, Relationship-Oriented" text, "Introverted, Relationship Oriented" text, "Moder...
SELECT "Extroverted, Relationship-Oriented" FROM table_16604 WHERE "Moderate" = 'Introverted Sanguine'
wikisql
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '59190525' AND t_kc22.STA_DATE BETWEEN '2003-08-11' AND '2014-07-07' AND t_kc21.MED_SER_ORG_NO = '2322054' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE table_29997112_3 ( international_use VARCHAR, flag_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the international use of the 1 flag?
SELECT international_use FROM table_29997112_3 WHERE flag_name = "1 единица"
sql_create_context
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 zyjzjlb ( CYBQDM text, CYBQMC...
SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.ZZYSGH = '59717906' AND mzjzjlb.JZKSRQ BETWEEN '2001-07-27' AND '2011-06-18'
css
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 jyjgzbb ( BGDH text, BGRQ tim...
SELECT COUNT(mzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '陈浩淼' AND mzjzjlb.JZKSRQ BETWEEN '2008-07-28' AND '2010-03-17'
css
CREATE TABLE table_5368 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the opponent of the submission (triangle choke) method of submi...
SELECT "Opponent" FROM table_5368 WHERE "Method" = 'submission (triangle choke)'
wikisql
CREATE TABLE member ( Member_ID text, Name text, Nationality text, Role text ) CREATE TABLE performance ( Performance_ID real, Date text, Host text, Location text, Attendance int ) CREATE TABLE member_attendance ( Member_ID int, Performance_ID int, Num_of_Pieces int ) ...
SELECT Location, COUNT(*) FROM performance GROUP BY Location ORDER BY Location
nvbench
CREATE TABLE table_70539 ( "Frame size" text, "Width" real, "Height" real, "Mpix" real, "Aspect Ratio" text, "Maximum fps" real, "Maximum fps HDRx" real, "least compression at 24 fps" text, "least compression at maximum fps" text ) -- Using valid SQLite, answer the following questi...
SELECT "Maximum fps HDRx" FROM table_70539 WHERE "Height" > '1080' AND "least compression at 24 fps" = '6:1' AND "least compression at maximum fps" = '7:1'
wikisql
CREATE TABLE table_59642 ( "Team" text, "Driver" text, "Class" text, "Chassis" text, "Engine" text, "Rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What c class engine did philipp eng and team hs technik motorsport use?
SELECT "Engine" FROM table_59642 WHERE "Class" = 'c' AND "Team" = 'hs technik motorsport' AND "Driver" = 'philipp eng'
wikisql
CREATE TABLE table_name_10 ( week_12 VARCHAR, week_9 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the week 12 nomination when the week 9 nomination walked (day 11)?
SELECT week_12 FROM table_name_10 WHERE week_9 = "walked (day 11)"
sql_create_context
CREATE TABLE table_78220 ( "Stellar mass ( M\u2609 )" real, "Planetary mass ( M\u2295 )" real, "Lum. (L 0 )" text, "Type" text, "RHAB ( AU )" real, "RV (cm/s)" real, "Period (days)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ...
SELECT MAX("Planetary mass ( M\u2295 )") FROM table_78220 WHERE "RV (cm/s)" = '65' AND "Period (days)" < '21'
wikisql
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Home, AVG(School_ID) FROM basketball_match GROUP BY All_Home ORDER BY AVG(School_ID) DESC
nvbench
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 CloseAsOffTopicReasonTypes ( Id number, IsUniversal bool...
SELECT Id, Id AS "post_link", LENGTH(Body) AS "post_length", Score FROM Posts WHERE OwnerUserId = '##UserId##' ORDER BY 'post_length' DESC
sede
CREATE TABLE table_name_37 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record for January 19?
SELECT record FROM table_name_37 WHERE date = "january 19"
sql_create_context
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,...
SELECT demographic.dob, lab.itemid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Jerry Deberry"
mimicsql_data
CREATE TABLE table_name_94 ( score VARCHAR, competition VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of the event with a competition type of friendly and a result of 4-5?
SELECT score FROM table_name_94 WHERE competition = "friendly" AND result = "4-5"
sql_create_context
CREATE TABLE table_52820 ( "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. -- How many people in total have attended games whe...
SELECT COUNT("Crowd") FROM table_52820 WHERE "Away team" = 'carlton'
wikisql
CREATE TABLE round ( round_id number, member_id number, decoration_theme text, rank_in_round number ) CREATE TABLE member ( member_id number, name text, country text, college_id number ) CREATE TABLE college ( college_id number, name text, leader_name text, college_loca...
SELECT T1.name, T2.decoration_theme FROM member AS T1 JOIN round AS T2 ON T1.member_id = T2.member_id
spider
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE m...
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hyperglycemia - suspected' AND DATETIME(diag...
eicu
CREATE TABLE table_12310814_1 ( song_choice VARCHAR, original_artist VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which one of the songs was originally performed by Rickie Lee Jones?
SELECT song_choice FROM table_12310814_1 WHERE original_artist = "Rickie Lee Jones"
sql_create_context
CREATE TABLE table_11614581_3 ( area VARCHAR, _in_thousands_of_km_2 VARCHAR, name_in_russian VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- governs an area with what area (in thousand km 2)?
SELECT area, _in_thousands_of_km_2 FROM table_11614581_3 WHERE name_in_russian = "Плоцкая губерния"
sql_create_context
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, ...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 53089 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE table_2453243_3 ( production_code INTEGER, no_in_season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the production code for episode 3 in the season?
SELECT MAX(production_code) FROM table_2453243_3 WHERE no_in_season = 3
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-17122')) AND intakeoutput.celllabel = 'i.v.'...
eicu
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 COUNT(*) FROM (SELECT t_kc24.t_kc21_MED_ORG_DEPT_CD FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '6959651' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-05-09' AND '2012-05-19' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) >= 90.82) AS T
css
CREATE TABLE pilot ( Name VARCHAR, Age VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List names of all pilot in descending order of age.
SELECT Name FROM pilot ORDER BY Age DESC
sql_create_context
CREATE TABLE table_28184 ( "Country" text, "Name of bullion coin" text, "Fineness" text, "Denominations (Gold weight)" text, "Years of mintage" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all the denominations for China?
SELECT "Denominations (Gold weight)" FROM table_28184 WHERE "Country" = 'China'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Cardiac rhythm conv NEC"
mimicsql_data
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartr...
SELECT MIN(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-41152')) AND intakeoutput.celllabel = 'salin...
eicu
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 inputevents_cv ( row_id number, subject_id number, ...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE ...
mimic_iii
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 MED_ORG_DEPT_NM, OUT_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '1393736' GROUP BY MED_ORG_DEPT_NM, OUT_DIAG_DIS_NM HAVING AVG(PERSON_AGE) > 10
css
CREATE TABLE table_1641054_2 ( established INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least established
SELECT MIN(established) FROM table_1641054_2
sql_create_context
CREATE TABLE table_name_25 ( score VARCHAR, opponent VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the game against the Braves with a record of 41 27?
SELECT score FROM table_name_25 WHERE opponent = "braves" AND record = "41–27"
sql_create_context
CREATE TABLE table_75949 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the biggest points when the grid is less than 13 and the time/retired is +7.538...
SELECT MAX("Points") FROM table_75949 WHERE "Grid" < '13' AND "Time/Retired" = '+7.538 secs'
wikisql
CREATE TABLE party ( party_id number, year number, party text, governor text, lieutenant_governor text, comptroller text, attorney_general text, us_senate text ) CREATE TABLE county ( county_id number, county_name text, population number, zip_code text ) CREATE TABLE el...
SELECT party FROM party GROUP BY party HAVING COUNT(*) >= 2
spider
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 jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '44774327755'
css
CREATE TABLE catalog_contents_additional_attributes ( catalog_entry_id number, catalog_level_number number, attribute_id number, attribute_value text ) CREATE TABLE catalog_structure ( catalog_level_number number, catalog_id number, catalog_level_name text ) CREATE TABLE attribute_definiti...
SELECT catalog_entry_name FROM catalog_contents WHERE length < 3 OR width > 5
spider
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, ...
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.name = "Paul Dunn"
mimicsql_data
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 offering_instructor ( offering_instructor_id int, offering_id int, ...
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 '%Biomechanics for Engineering Students%' OR course.description LIKE '%Biomechanics for Engineerin...
advising
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_20...
SELECT Country, COUNT(*) FROM stadium GROUP BY Country
nvbench
CREATE TABLE table_25777 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What i...
SELECT "Score" FROM table_25777 WHERE "Location Attendance" = 'Madison Square Garden 19,763' AND "Game" < '80.0'
wikisql
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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Combined right and left heart angiocardiography"
mimicsql_data
CREATE TABLE table_44352 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the year won of 2001, what is the To Par?
SELECT "To par" FROM table_44352 WHERE "Year(s) won" = '2001'
wikisql
CREATE TABLE table_48229 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can yo...
SELECT "High assists" FROM table_48229 WHERE "Date" = 'november 25'
wikisql
CREATE TABLE bank ( branch_ID int, bname varchar(20), no_of_customers int, city varchar(10), state varchar(20) ) CREATE TABLE customer ( cust_ID varchar(3), cust_name varchar(20), acc_type char(1), acc_bal int, no_of_loans int, credit_score int, branch_ID int, state ...
SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID
nvbench
CREATE TABLE table_18967 ( "Election date" real, "Party leader" text, "Number of votes received" real, "Percentage of votes" text, "Number of deputies" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the number of deputies with number of votes...
SELECT "Number of deputies" FROM table_18967 WHERE "Number of votes received" < '1549176.2765483726' AND "Election date" = '1969'
wikisql
CREATE TABLE table_name_10 ( team VARCHAR, location_attendance VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which team was the opponent that had a location of Madison Square Garden with a score of 87-83?
SELECT team FROM table_name_10 WHERE location_attendance = "madison square garden" AND score = "87-83"
sql_create_context
CREATE TABLE table_23803 ( "BSE Code" text, "Company" text, "City" text, "GICS Sector" text, "Free float" text, "Index weighting (%" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which companies have a free float of 0.2726?
SELECT "Company" FROM table_23803 WHERE "Free float" = '0.2726'
wikisql
CREATE TABLE table_19230 ( "Country/Territory" text, "Former pageant" text, "Last competed" real, "New pageant" text, "Franchise since" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which is the new pageant from spain?
SELECT "New pageant" FROM table_19230 WHERE "Country/Territory" = 'Spain'
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 gwyjzb.OUT_DIAG_DOC_CD, gwyjzb.OUT_DIAG_DOC_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '68061275' AND gwyjzb.IN_HOSP_DATE BETWEEN '2004-10-02' AND '2005-07-28' GROUP BY gwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT fgwyjzb.OUT_DIAG_DOC_CD, fgwyjzb.OUT_DIAG_DOC_NM FROM fgwyjzb WHERE fgwyjzb.PERS...
css
CREATE TABLE table_45454 ( "Season" real, "Episodes" real, "Season premiere" text, "Season finale" text, "TV season" text, "Rank" text, "Households (millions)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT SEASON HAD A SEASON FINALE OF...
SELECT MAX("Season") FROM table_45454 WHERE "Season finale" = 'may 21, 1989' AND "Households (millions)" < '17.98'
wikisql
CREATE TABLE table_57449 ( "Name" text, "Bodyweight" real, "Snatch" real, "Clean & jerk" real, "Total (kg)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the average bodyweight when snatch is 80?
SELECT AVG("Bodyweight") FROM table_57449 WHERE "Snatch" = '80'
wikisql
CREATE TABLE table_name_64 ( pali VARCHAR, tibetan VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the pali word for phrag dog in tibetan?
SELECT pali FROM table_name_64 WHERE tibetan = "phrag dog"
sql_create_context
CREATE TABLE table_name_68 ( attendance VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number in attendance at Los Angeles Memorial Coliseum?
SELECT COUNT(attendance) FROM table_name_68 WHERE venue = "los angeles memorial coliseum"
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 Name, SUM(Price) FROM Products GROUP BY Name ORDER BY SUM(Price)
nvbench
CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
SELECT zyjybgb.JYKSBM, zyjybgb.JYKSMC FROM zyjybgb WHERE zyjybgb.BGDH = '95422285600' UNION SELECT mzjybgb.JYKSBM, mzjybgb.JYKSMC FROM mzjybgb WHERE mzjybgb.BGDH = '95422285600'
css
CREATE TABLE table_19777 ( "Administrative division" text, "Area (km\u00b2)" text, "Population 2000 Census" real, "Population (2010 Census)" real, "Population density 2010 (/km\u00b2)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number o...
SELECT COUNT("Area (km\u00b2)") FROM table_19777 WHERE "Population density 2010 (/km\u00b2)" = '514'
wikisql
CREATE TABLE table_204_353 ( id number, "no." number, "date/time" text, "aircraft" text, "foe" text, "result" text, "location" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- are there any other aircraft listed besides the n...
SELECT "aircraft" FROM table_204_353 WHERE "aircraft" <> 'nieuport 17'
squall
CREATE TABLE table_name_76 ( reserved_for___sc___st__none_ VARCHAR, constituency_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the reserved for value for constituency number 132?
SELECT reserved_for___sc___st__none_ FROM table_name_76 WHERE constituency_number = "132"
sql_create_context
CREATE TABLE bdmzjzjlb ( 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, MZZYZDZ...
SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '孙咏歌' AND hz_info.YLJGDM = '0919539' AND NOT wdmzjzjlb.JZZDSM LIKE '%抽动%' UNION SELECT * FROM person_info JO...
css
CREATE TABLE table_name_97 ( goals_against INTEGER, lost INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fewest goals against for teams with more than 27 losses?
SELECT MIN(goals_against) FROM table_name_97 WHERE lost > 27
sql_create_context
CREATE TABLE table_203_46 ( id number, "country" text, "url" text, "opening date" text, "closing date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which country had the earliest opening date ?
SELECT "country" FROM table_203_46 ORDER BY "opening date" LIMIT 1
squall
CREATE TABLE table_name_30 ( theme VARCHAR, result VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the theme for Vegas Verdicts week with a result of Advanced?
SELECT theme FROM table_name_30 WHERE result = "advanced" AND week = "vegas verdicts"
sql_create_context
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime tim...
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73075) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'creatinine') AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURR...
mimic_iii
CREATE TABLE table_40215 ( "Administrative Panel" real, "Agricultural Panel" real, "Cultural and Educational Panel" real, "Industrial and Commercial Panel" real, "Labour Panel" real, "National University of Ireland" real, "University of Dublin" real, "Nominated by the Taoiseach" real, ...
SELECT COUNT("Cultural and Educational Panel") FROM table_40215 WHERE "Labour Panel" > '5' AND "Industrial and Commercial Panel" > '9'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CRE...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '007-15837' AND patient.unitdischargetime IS NULL
eicu
CREATE TABLE table_name_81 ( age_at_time_of_disaster VARCHAR, date_of_birth VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How old was the person born 24 September 1851 at the time of disaster?
SELECT age_at_time_of_disaster FROM table_name_81 WHERE date_of_birth = "24 september 1851"
sql_create_context
CREATE TABLE table_203_345 ( id number, "name" text, "party" text, "took office" number, "left office" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which progressive party member took office after a liberal ?
SELECT "name" FROM table_203_345 WHERE "party" = 'progressive' AND id = (SELECT id FROM table_203_345 WHERE "party" = 'liberal') + 1
squall
CREATE TABLE table_27994983_8 ( viewers INTEGER, draw VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many viewers are the when the draw is 3?
SELECT MAX(viewers) FROM table_27994983_8 WHERE draw = 3
sql_create_context
CREATE TABLE table_name_16 ( top_25 INTEGER, top_10 VARCHAR, events VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the larger number of players that played in 4 events that 2 wins but were less than 6 in the top 10?
SELECT MAX(top_25) FROM table_name_16 WHERE events > 4 AND wins = 2 AND top_10 < 6
sql_create_context
CREATE TABLE table_30294 ( "Vessel" text, "Built" real, "Max Speed" text, "Length" text, "Breadth" text, "Flag" text, "Propulsion" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many breadth entries are there when the vessel is marianarr...
SELECT COUNT("Breadth") FROM table_30294 WHERE "Vessel" = 'Marianarray'
wikisql
CREATE TABLE table_2562572_11 ( settlement VARCHAR, cyrillic_name_other_names VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How to you write with the latin alphabet?
SELECT settlement FROM table_2562572_11 WHERE cyrillic_name_other_names = "Плавна"
sql_create_context
CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE CO...
SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_NAME) FROM DEPARTMENT ORDER BY SCHOOL_CODE DESC
nvbench
CREATE TABLE table_203_469 ( id number, "year" text, "round" text, "position" number, "matches" number, "wins" number, "draws" number, "losses" number, "gf" number, "ga" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which year...
SELECT "year" FROM table_203_469 WHERE "year" IN (1998, 2006) ORDER BY "losses" LIMIT 1
squall
CREATE TABLE table_name_3 ( win__percentage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the winning % for the 2010 QF?
SELECT win__percentage FROM table_name_3 WHERE 2010 = "qf"
sql_create_context
CREATE TABLE table_61558 ( "Draw" real, "Artist" text, "Song" text, "Results" text, "Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What song has a draw more than 4 in 1st place?
SELECT "Song" FROM table_61558 WHERE "Draw" > '4' AND "Place" = '1st'
wikisql
CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
SELECT zyjybgb.JYLX FROM zyjybgb WHERE zyjybgb.BGDH = '48426577162' UNION SELECT mzjybgb.JYLX FROM mzjybgb WHERE mzjybgb.BGDH = '48426577162'
css
CREATE TABLE table_16034882_3 ( draws INTEGER, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest number of draws for sveikata kybartai
SELECT MAX(draws) FROM table_16034882_3 WHERE club = "Sveikata Kybartai"
sql_create_context
CREATE TABLE table_name_18 ( erp_w VARCHAR, frequency_mhz VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ERP W for the frequency of 91.3MHz?
SELECT erp_w FROM table_name_18 WHERE frequency_mhz = 91.3
sql_create_context
CREATE TABLE table_25878 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who ha...
SELECT "High points" FROM table_25878 WHERE "Score" = 'W 97–92 (OT)'
wikisql
CREATE TABLE table_name_88 ( driver VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Driver, when Team is 'Romano Racing'?
SELECT driver FROM table_name_88 WHERE team = "romano racing"
sql_create_context
CREATE TABLE table_name_37 ( district VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the district of the incumbent Thomas Larkin Thompson?
SELECT district FROM table_name_37 WHERE incumbent = "thomas larkin thompson"
sql_create_context
CREATE TABLE table_10040 ( "Name" text, "Country" text, "Transfer window" text, "Transfer fee" text, "Apps" real, "Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times is the transfer fee 2,500,000?
SELECT COUNT("Goals") FROM table_10040 WHERE "Transfer fee" = '£2,500,000'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT demographic.admittime, demographic.dischtime FROM demographic WHERE demographic.subject_id = "53707"
mimicsql_data
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 prescriptions.icustay_id FROM prescriptions WHERE prescriptions.subject_id = "18112"
mimicsql_data
CREATE TABLE table_name_99 ( rank_by_average INTEGER, average VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the lowest rank by average of a couple who had an average of 23 and a total of 115?
SELECT MIN(rank_by_average) FROM table_name_99 WHERE average = 23 AND total = 115
sql_create_context
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '14901191' AND MED_SER_ORG_NO = '1058628' AND IN_HOSP_DATE BETWEEN '2008-03-25' AND '2010-01-16')
css
CREATE TABLE table_204_730 ( id number, "date" text, "place" text, "disc." text, "winner" text, "second" text, "third" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which skier earned first place on 15 march 2006 in the 2006 alpine skiing w...
SELECT "winner" FROM table_204_730 WHERE "date" = '15 march 2006'
squall
CREATE TABLE table_name_5 ( tournament VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what tournament did Cipolla face Sergio Roitman?
SELECT tournament FROM table_name_5 WHERE opponent = "sergio roitman"
sql_create_context
CREATE TABLE table_2522473_1 ( team VARCHAR, seasons VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many teams have been in Topperserien for 8 seasons?
SELECT COUNT(team) FROM table_2522473_1 WHERE seasons = 8
sql_create_context
CREATE TABLE table_57189 ( "Round" text, "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result for the round of 4 leg 2 when the attendance was less than 20,371...
SELECT "Result" FROM table_57189 WHERE "Attendance" > '20,371' AND "Round" = '4 leg 2'
wikisql
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '褚修筠' AND hz_info.YLJGDM = '1673796' AND NOT mzjzjlb.JZKSMC LIKE '%呼吸%'
css
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResults ( Id number, ...
SELECT YEAR(CreationDate), MONTH(CreationDate) AS "month", COUNT(*) AS "count" FROM Posts WHERE NOT Title LIKE '%Who%' AND NOT Title LIKE '%What%' AND NOT Title LIKE '%When%' AND NOT Title LIKE '%Where%' AND NOT Title LIKE '%Why%' AND NOT Title LIKE '%How%' AND NOT Title LIKE '%Can%' AND NOT Title LIKE '%Is%' AND NOT T...
sede
CREATE TABLE table_13496 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" real, "Water (sqmi)" real, "Latitude" real, "Longitude" real, "GEO ID" real, "ANSI code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- wh...
SELECT AVG("Longitude") FROM table_13496 WHERE "Water (sqmi)" = '0.317' AND "ANSI code" > '1759695'
wikisql
CREATE TABLE table_name_43 ( wins INTEGER, rank INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number of wins was ranked higher than 5?
SELECT SUM(wins) FROM table_name_43 WHERE rank > 5
sql_create_context
CREATE TABLE table_17180 ( "Name of ground" text, "Location" text, "Year" text, "FC matches" real, "LA matches" real, "T20 matches" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum t20 on green lane?
SELECT MAX("T20 matches") FROM table_17180 WHERE "Name of ground" = 'Green Lane'
wikisql
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2073" AND lab.flag = "abnormal"
mimicsql_data
CREATE TABLE Student_Addresses ( student_id INTEGER, address_id INTEGER, date_address_from DATETIME, date_address_to DATETIME, monthly_rental DECIMAL(19,4), other_details VARCHAR(255) ) CREATE TABLE Addresses ( address_id INTEGER, line_1 VARCHAR(120), line_2 VARCHAR(120), line_3...
SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes ORDER BY COUNT(date_of_notes)
nvbench