instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_50934 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What to par has The United States as the country, t8 as the place, and tommy valentine as the player?
SELECT "To par" FROM table_50934 WHERE "Country" = 'united states' AND "Place" = 't8' AND "Player" = 'tommy valentine'
wikisql
CREATE TABLE Catalog_Structure ( catalog_level_number INTEGER, catalog_id INTEGER, catalog_level_name VARCHAR(50) ) CREATE TABLE Attribute_Definitions ( attribute_id INTEGER, attribute_name VARCHAR(30), attribute_data_type VARCHAR(10) ) CREATE TABLE Catalog_Contents_Additional_Attributes ( ...
SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY COUNT(catalog_entry_name)
nvbench
CREATE TABLE gyb ( CLINIC_ID 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, INSU_TYPE text, IN...
SELECT * FROM qtb WHERE qtb.MED_SER_ORG_NO = '2674806' AND qtb.IN_HOSP_DATE BETWEEN '2000-05-19' AND '2004-09-02' UNION SELECT * FROM gyb WHERE gyb.MED_SER_ORG_NO = '2674806' AND gyb.IN_HOSP_DATE BETWEEN '2000-05-19' AND '2004-09-02' UNION SELECT * FROM zyb WHERE zyb.MED_SER_ORG_NO = '2674806' AND zyb.IN_HOSP_DATE BETW...
css
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 WHERE demographic.expire_flag = "1" AND prescriptions.drug = "Atropine Sulfate"
mimicsql_data
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 SUM(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.PERSON_ID = '25376993' AND t_kc21.CLINIC_TYPE = '门诊'
css
CREATE TABLE table_name_8 ( date VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the Mariners game that had an attendance of 6,707?
SELECT date FROM table_name_8 WHERE attendance = "6,707"
sql_create_context
CREATE TABLE table_6893 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Team when the lost is less than 13, ...
SELECT "Team" FROM table_6893 WHERE "Lost" < '13' AND "Position" < '4' AND "Difference" = '42'
wikisql
CREATE TABLE table_name_89 ( year INTEGER, chassis VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was the brabham bt46 bt48 bt49 Chassis common?
SELECT AVG(year) FROM table_name_89 WHERE chassis = "brabham bt46 bt48 bt49"
sql_create_context
CREATE TABLE table_36368 ( "Season" text, "Tier" real, "League" text, "Pos." real, "Postseason" text, "Dutch Cup" text, "European competitions" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which European competitions have a Pos of 6?
SELECT "European competitions" FROM table_36368 WHERE "Pos." = '6'
wikisql
CREATE TABLE table_4584 ( "Stage" text, "Start time" text, "Stage name" text, "Distance" text, "Winning driver" text, "Time" text, "Avg. Speed" text, "Rally leader" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the finishing ti...
SELECT "Time" FROM table_4584 WHERE "Distance" = '18.25km' AND "Start time" = '11:31'
wikisql
CREATE TABLE table_name_11 ( game INTEGER, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which game is on the date October 16?
SELECT AVG(game) FROM table_name_11 WHERE date = "october 16"
sql_create_context
CREATE TABLE table_11622896_1 ( score VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score for the Oregon location?
SELECT score FROM table_11622896_1 WHERE location = "Oregon"
sql_create_context
CREATE TABLE zyjybgb ( 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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZ...
css
CREATE TABLE table_27755603_2 ( record VARCHAR, high_rebounds VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the record in the game where Greg Monroe (8) did the high rebounds?
SELECT record FROM table_27755603_2 WHERE high_rebounds = "Greg Monroe (8)"
sql_create_context
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE offering_instructor ( ...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co...
advising
CREATE TABLE table_28374 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the m...
SELECT MAX("F/Laps") FROM table_28374
wikisql
CREATE TABLE table_name_44 ( frequency_mhz VARCHAR, erp_w VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the frequency mhz for ERP W of 850 watts
SELECT frequency_mhz FROM table_name_44 WHERE erp_w = "850 watts"
sql_create_context
CREATE TABLE table_68900 ( "Episode" text, "First aired" text, "Entrepreneur(s)" text, "Company or product name" text, "Money requested (\u00a3)" text, "Investing Dragon(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The entrepreneur Adam We...
SELECT "Episode" FROM table_68900 WHERE "Entrepreneur(s)" = 'adam weaver'
wikisql
CREATE TABLE table_11928 ( "Number & name" text, "Description" text, "Current status" text, "Livery" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name and number in 1962 when livery was Br Bauxite?
SELECT "Number & name" FROM table_11928 WHERE "Date" = '1962' AND "Livery" = 'br bauxite'
wikisql
CREATE TABLE table_name_1 ( us_ac VARCHAR, label_and_cat_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the US AC of the label and cat# reprise 19466?
SELECT us_ac FROM table_name_1 WHERE label_and_cat_number = "reprise 19466"
sql_create_context
CREATE TABLE table_33358 ( "Learner driver" text, "Partner" text, "Driver's Age" real, "Years on learners" real, "Licence test attempts" real, "Passed Yet" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which partner has fewer than 17 years on l...
SELECT "Partner" FROM table_33358 WHERE "Years on learners" < '17' AND "Driver's Age" > '32'
wikisql
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE R...
SELECT Id AS "post_link" FROM Posts WHERE AnswerCount = 0 AND Id IN (SELECT DISTINCT PostHistory.PostId AS "post_link" FROM PostHistory LEFT JOIN (SELECT DISTINCT PostId, CreationDate FROM PostHistory WHERE PostHistoryTypeId = 15) AS Unlocked ON PostHistory.PostId = Unlocked.PostId AND PostHistory.CreationDate < Unlock...
sede
CREATE TABLE table_name_64 ( to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the to par of Philip Parkin?
SELECT to_par FROM table_name_64 WHERE player = "philip parkin"
sql_create_context
CREATE TABLE table_2930244_2 ( year VARCHAR, number_of_hurricanes VARCHAR, strongest_storm VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years saw 3 hurricanes wherein the strongest storm was level three?
SELECT COUNT(year) FROM table_2930244_2 WHERE number_of_hurricanes = 3 AND strongest_storm = "Three"
sql_create_context
CREATE TABLE table_25625 ( "County" text, "Gore %" text, "Gore #" real, "Bush %" text, "Bush #" real, "Others %" text, "Others #" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the gore number for others % being 5.3%
SELECT "Gore #" FROM table_25625 WHERE "Others %" = '5.3%'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number,...
SELECT RYTJDM, RYTJMC FROM zyjzjlb WHERE JZLSH = '02615390249'
css
CREATE TABLE table_39696 ( "Call sign" text, "Launched" text, "Transmitting from" text, "Coverage" text, "Languages" text, "Frequency" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the frequency of the station that was launched on 21 Au...
SELECT "Frequency" FROM table_39696 WHERE "Launched" = '21 august 1994'
wikisql
CREATE TABLE table_name_65 ( year VARCHAR, manager VARCHAR, finish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the year for jesus alfaro and finish of 6th
SELECT year FROM table_name_65 WHERE manager = "jesus alfaro" AND finish = "6th"
sql_create_context
CREATE TABLE table_11825 ( "State" text, "Preliminaries" real, "Interview" real, "Swimsuit" real, "Evening Gown" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average evening gown score of the contestant from New Yor...
SELECT AVG("Evening Gown") FROM table_11825 WHERE "Swimsuit" < '8.703' AND "State" = 'new york' AND "Preliminaries" > '8.292'
wikisql
CREATE TABLE party_events ( Event_ID int, Event_Name text, Party_ID int, Member_in_charge_ID int ) CREATE TABLE region ( Region_ID int, Region_name text, Date text, Label text, Format text, Catalogue text ) CREATE TABLE member ( Member_ID int, Member_Name text, Part...
SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_72045 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which date has a Record of 41-46?
SELECT "Date" FROM table_72045 WHERE "Record" = '41-46'
wikisql
CREATE TABLE table_70275 ( "Episode #" real, "Title" text, "Airdate" text, "Viewers (millions)" real, "Channel 4 weekly rank a" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of viewers in millions for the episode on October 10, 2...
SELECT COUNT("Viewers (millions)") FROM table_70275 WHERE "Airdate" = 'october 10, 2008' AND "Channel 4 weekly rank a" < '30'
wikisql
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, hi...
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 = 'TAMPA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MONTREAL...
atis
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE T...
SELECT patients.dob FROM patients WHERE patients.subject_id = 97834
mimic_iii
CREATE TABLE manufacturers ( code number, name text, headquarter text, founder text, revenue number ) CREATE TABLE products ( code number, name text, price number, manufacturer number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What i...
SELECT SUM(revenue), name FROM manufacturers GROUP BY name
spider
CREATE TABLE table_2679061_12 ( position VARCHAR, nhl_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the position for the boston bruins.
SELECT position FROM table_2679061_12 WHERE nhl_team = "Boston Bruins"
sql_create_context
CREATE TABLE table_63319 ( "Rank" real, "Rowers" text, "Country" text, "Time" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the rowers for Great britain?
SELECT "Rowers" FROM table_63319 WHERE "Country" = 'great britain'
wikisql
CREATE TABLE table_28677723_10 ( tor_fløysvik INTEGER, couple VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is listed under tor floysvik when couple is maria & asmund?
SELECT MIN(tor_fløysvik) FROM table_28677723_10 WHERE couple = "Maria & Asmund"
sql_create_context
CREATE TABLE manager ( Manager_ID int, Name text, Country text, Working_year_starts text, Age int, Level int ) CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE railway ( Railway_ID int, Railway ...
SELECT Builder, COUNT(*) FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_79573 ( "School" text, "Location" text, "Mascot" text, "Enrollment 08-09" real, "IHSAA Class" text, "IHSAA Class Football" text, "County" text, "Year Joined" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the IH...
SELECT "IHSAA Class Football" FROM table_79573 WHERE "Mascot" = 'panthers'
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 lab ( subject_id text, hadm_id text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME" AND demographic.days_stay > "20"
mimicsql_data
CREATE TABLE table_79960 ( "Year built" text, "Builder" text, "Model" text, "Fleet ID" text, "Seats" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the train built in 2012 with less than 179 seats, what is the Fleet ID?
SELECT "Fleet ID" FROM table_79960 WHERE "Year built" = '2012' AND "Seats" < '179'
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 MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "TRANSIENT ISCHEMIC ATTACK" AND demographic.dob_year > "2095"
mimicsql_data
CREATE TABLE table_2454589_1 ( last_title VARCHAR, home_city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the last title for cuenca
SELECT last_title FROM table_2454589_1 WHERE home_city = "Cuenca"
sql_create_context
CREATE TABLE table_name_55 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the score 6 3, 3 6, 6 0?
SELECT date FROM table_name_55 WHERE score = "6–3, 3–6, 6–0"
sql_create_context
CREATE TABLE table_62991 ( "Title" text, "Series" text, "Director" text, "Production Num." text, "Release date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What series was directed by Frank Tashlin and has the production number, 8053?
SELECT "Series" FROM table_62991 WHERE "Director" = 'frank tashlin' AND "Production Num." = '8053'
wikisql
CREATE TABLE table_name_16 ( attendance INTEGER, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Attendance at a game with a Result of w 30-23?
SELECT AVG(attendance) FROM table_name_16 WHERE result = "w 30-23"
sql_create_context
CREATE TABLE table_78795 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Record of 1-4?
SELECT "Date" FROM table_78795 WHERE "Record" = '1-4'
wikisql
CREATE TABLE table_54326 ( "Team" text, "Manager" text, "Captain" text, "Kit manufacturer" text, "Shirt sponsor" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the shirt sponsor for Captain Geoff Thomas' team?
SELECT "Shirt sponsor" FROM table_54326 WHERE "Captain" = 'geoff thomas'
wikisql
CREATE TABLE table_name_74 ( matches INTEGER, against VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Matches, when Against is less than 7, and when Wins is greater than 1?
SELECT MIN(matches) FROM table_name_74 WHERE against < 7 AND wins > 1
sql_create_context
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 advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 285
advising
CREATE TABLE table_name_42 ( opponent VARCHAR, year VARCHAR, partner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was Choong Tan Fook's opponent in 1999?
SELECT opponent FROM table_name_42 WHERE year = 1999 AND partner = "choong tan fook"
sql_create_context
CREATE TABLE table_name_42 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What home team played Collingwood as the away team?
SELECT home_team FROM table_name_42 WHERE away_team = "collingwood"
sql_create_context
CREATE TABLE table_204_544 ( id number, "rank" number, "name" text, "nationality" text, "time" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in the 2002 pan pacific swimming championships women 's 100 metre backstroke , which nati...
SELECT "nationality" FROM table_204_544 WHERE "rank" <= 8 GROUP BY "nationality" ORDER BY COUNT("name") DESC LIMIT 1
squall
CREATE TABLE table_1182314_5 ( percent__1990_ VARCHAR, state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are all the percent (1990) where state is united states
SELECT percent__1990_ FROM table_1182314_5 WHERE state = "United states"
sql_create_context
CREATE TABLE table_14957 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date when bye was opponent
SELECT "Date" FROM table_14957 WHERE "Opponent" = 'bye'
wikisql
CREATE TABLE table_31240 ( "Episode" real, "Title" text, "Directed by" text, "Written by" text, "UK viewers (million)" text, "Share (%)" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes are directed ...
SELECT COUNT("Episode") FROM table_31240 WHERE "Directed by" = 'Jamie Payne'
wikisql
CREATE TABLE table_40627 ( "Japanese name" text, "Kana" text, "Hanja / Kanji" text, "Korean name" text, "Hangul" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Hangul of the Province with a Kana of ?
SELECT "Hangul" FROM table_40627 WHERE "Kana" = 'ちゅうせいなんどう'
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 WHERE demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT "
mimicsql_data
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, UNIVALENT FROM t_kc22 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '68237125' AND MED_SER_ORG_NO = '2715252') ORDER BY UNIVALENT DESC LIMIT 1
css
CREATE TABLE txmzjzjlb ( 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 txmzjzjlb.JZLSH FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '27160966' AND NOT txmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2007-10-30') UNION SELECT ftxmzjzjlb.JZLSH FROM hz_info JOI...
css
CREATE TABLE table_name_58 ( total VARCHAR, player VARCHAR, to_par VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total for a to par bigger than 7 and a player of al geiberger?
SELECT COUNT(total) FROM table_name_58 WHERE player = "al geiberger" AND to_par > 7
sql_create_context
CREATE TABLE table_123462_2 ( election VARCHAR, _number_of_candidates_nominated VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the election year when the # of candidates nominated was 262?
SELECT COUNT(election) FROM table_123462_2 WHERE _number_of_candidates_nominated = 262
sql_create_context
CREATE TABLE table_55885 ( "Software" text, "Latest stable date (version)" text, "Cost ( USD )" text, "Open source" text, "License" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the free sotware with the latest stable date version of 1.1?
SELECT "Software" FROM table_55885 WHERE "Cost ( USD )" = 'free' AND "Latest stable date (version)" = '1.1'
wikisql
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE airline ( airline_code varchar, airline_name ...
SELECT DISTINCT ground_service.transport_type FROM airport, ground_service WHERE airport.airport_code = 'DFW' AND ground_service.airport_code = airport.airport_code
atis
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY city_code DESC
nvbench
CREATE TABLE table_name_3 ( total VARCHAR, event VARCHAR, rank_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total for the wc belgrade event with 10 rank points?
SELECT total FROM table_name_3 WHERE event = "wc belgrade" AND rank_points = "10"
sql_create_context
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT; MYOMECTOMY/SDA"
mimicsql_data
CREATE TABLE table_204_863 ( id number, "state" text, "city/county" text, "population served" number, "charter type" text, "station name" text, "web site" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- does st. louis or rolla have the higher...
SELECT "city/county" FROM table_204_863 WHERE "city/county" IN ('st. louis', 'rolla') ORDER BY "population served" DESC LIMIT 1
squall
CREATE TABLE table_69232 ( "Race Title" text, "Circuit" text, "City / State" text, "Date" text, "Winner" text, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Jim Richards won at the Winton Motor Raceway circuit, what was the city and...
SELECT "City / State" FROM table_69232 WHERE "Winner" = 'jim richards' AND "Circuit" = 'winton motor raceway'
wikisql
CREATE TABLE table_name_38 ( round VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the round of club be ej?
SELECT round FROM table_name_38 WHERE club = "bečej"
sql_create_context
CREATE TABLE table_name_70 ( attendance VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Attendance that has the Opponent of new york giants?
SELECT attendance FROM table_name_70 WHERE opponent = "new york giants"
sql_create_context
CREATE TABLE zyb ( CLINIC_ID 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, INSU_TYPE text, IN...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '90461367' AND qtb.MED_SER_ORG_NO = '5572160' AND qtb.IN_HOSP_DATE BETWEEN '2001-04-20' AND '2004-12-07' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = ...
css
CREATE TABLE table_77606 ( "Season" text, "Competition" text, "Matches" real, "Draw" real, "Lost" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of matches with a loss less than 5 in the 2008/2009 season a...
SELECT COUNT("Matches") FROM table_77606 WHERE "Lost" < '5' AND "Season" = '2008/2009' AND "Draw" > '9'
wikisql
CREATE TABLE table_74016 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of party for kentucky 1
SELECT COUNT("Party") FROM table_74016 WHERE "District" = 'Kentucky 1'
wikisql
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 COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.ZSEBZ = '5043128' AND bdmzjzjlb.JZKSRQ BETWEEN '2004-03-08' AND '2005-12-26'
css
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, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(EMPLOYEE_ID) DESC
nvbench
CREATE TABLE table_204_103 ( id number, "medal" text, "name" text, "sport" text, "event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many silver medals did india win in shooting ?
SELECT COUNT("name") FROM table_204_103 WHERE "sport" = 'shooting'
squall
CREATE TABLE table_22297 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who directed the episode with the original air date ...
SELECT "Directed by" FROM table_22297 WHERE "Original air date" = 'November 22, 1989'
wikisql
CREATE TABLE table_16044 ( "Year" real, "Broadcast date" text, "BBC One total viewing" real, "BBC One Rank" text, "BBC Two total viewing" text, "BBC Two Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was the BBC two total viewing...
SELECT MIN("Year") FROM table_16044 WHERE "BBC Two total viewing" = '7,530,000'
wikisql
CREATE TABLE table_name_64 ( lost VARCHAR, losing_bonus VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Lost, when Losing Bonus is '3', and when Club is 'Bettws RFC'?
SELECT lost FROM table_name_64 WHERE losing_bonus = "3" AND club = "bettws rfc"
sql_create_context
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_DIRE_CD text, MED_DIRE_NM text,...
SELECT COUNT(t_kc21.MED_SER_ORG_NO) FROM t_kc21 WHERE t_kc21.PERSON_NM = '尤英秀' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-04-29' AND '2015-07-29'
css
CREATE TABLE table_name_93 ( dates_active VARCHAR, deaths VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was there 204 deaths?
SELECT dates_active FROM table_name_93 WHERE deaths = "204"
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2058" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_NM = '金清懿' AND IN_HOSP_DATE BETWEEN '2007-05-26' AND '2014-05-11' GROUP BY IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE table_46318 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result for the match that was only 2:48...
SELECT "Res." FROM table_46318 WHERE "Time" = '2:48'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE charte...
SELECT STRFTIME('%j', admissions.dischtime) - STRFTIME('%j', admissions.admittime) FROM admissions WHERE admissions.subject_id = 3745 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE apartment_buildings ( building_id number, building_short_name text, building_full_name text, building_description text, building_address text, building_manager text, building_phone text ) CREATE TABLE apartment_facilities ( apt_id number, facility_code text ) CREATE TA...
SELECT apt_type_code FROM apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_69199 ( "Venue" text, "City" text, "Tickets Sold / Available" text, "Gross Revenue (1982)" text, "Gross Revenue (2011)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many tickets were sold / available for the venue that had a...
SELECT "Tickets Sold / Available" FROM table_69199 WHERE "Gross Revenue (2011)" = '$333,100'
wikisql
CREATE TABLE table_17655 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Total viewers (in millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number...
SELECT COUNT("Title") FROM table_17655 WHERE "Written by" = 'Casey Johnson'
wikisql
CREATE TABLE table_19810459_1 ( hometown VARCHAR, background VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the hometown of the contestant whose background is as a financial consultant?
SELECT hometown FROM table_19810459_1 WHERE background = "Financial consultant"
sql_create_context
CREATE TABLE table_name_69 ( chassis VARCHAR, driver VARCHAR, rounds VARCHAR, entrant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the chassis for all rounds on the entrant Benson and Hedges Jordan driven by Damon Hill?
SELECT chassis FROM table_name_69 WHERE rounds = "all" AND entrant = "benson and hedges jordan" AND driver = "damon hill"
sql_create_context
CREATE TABLE wdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '6901656' AND wdmzjzjlb.JZKSDM = '6774' AND wdmzjzjlb.RYDJSJ BETWEEN '2007-04-07' AND '2009-03-29' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '6901656' AND bdmzjzjlb.JZKSDM = '6774' AND bdmzjzjlb.RYDJSJ BETWEEN '2007-04-07' AND '2009-03-29'
css
CREATE TABLE table_27611593_5 ( partner VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was Petrova's partner where she scored 6 2, 3 6, 6 7 (7-9)?
SELECT partner FROM table_27611593_5 WHERE score = "6–2, 3–6, 6–7 (7-9)"
sql_create_context
CREATE TABLE table_name_92 ( reference VARCHAR, release_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Reference has a Release date of 1996/10/10?
SELECT reference FROM table_name_92 WHERE release_date = "1996/10/10"
sql_create_context
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, Di...
SELECT c.Id AS "comment_link" FROM Comments AS c WHERE c.Text LIKE '%hank%' AND LENGTH(c.Text) < 21 ORDER BY c.CreationDate LIMIT 1000
sede
CREATE TABLE table_45712 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has a Record of 1-2?
SELECT "Score" FROM table_45712 WHERE "Record" = '1-2'
wikisql
CREATE TABLE table_43105 ( "Final Rank" real, "Ranking Round Rank" real, "Nation" text, "Ranking Score" real, "Round of 16" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Ranking Round Rank for Russia with a Final Rank over 11?
SELECT MAX("Ranking Round Rank") FROM table_43105 WHERE "Nation" = 'russia' AND "Final Rank" > '11'
wikisql
CREATE TABLE table_10223 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score when 43,746 attended?
SELECT "Score" FROM table_10223 WHERE "Attendance" = '43,746'
wikisql
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 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 = '39...
css