context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_204_613 ( id number, "title" text, "year" number, "peak chart positions\nus" number, "peak chart positions\nus\nr&b" number, "peak chart positions\nus\nrap" number, "album" text )
tell me the only song to get on the us rap chart .
SELECT "title" FROM table_204_613 WHERE NOT "peak chart positions\nus\nrap" IS NULL
squall
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE gsi ( course_offeri...
Do you know if 800 has a lab ?
SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 800
advising
CREATE TABLE table_name_16 ( grid INTEGER, laps VARCHAR, time_retired VARCHAR )
Which Grid has Laps larger than 26, and a Time/Retired of 44:39.467?
SELECT MIN(grid) FROM table_name_16 WHERE laps > 26 AND time_retired = "44:39.467"
sql_create_context
CREATE TABLE table_name_89 ( socialist_ticket VARCHAR, socialist_labor_ticket VARCHAR )
Who's the Socialist ticket with a Socialist Labor ticket of charles m. carlson?
SELECT socialist_ticket FROM table_name_89 WHERE socialist_labor_ticket = "charles m. carlson"
sql_create_context
CREATE TABLE table_name_27 ( team VARCHAR, games VARCHAR, rebounds VARCHAR )
What team has more than 32 games and 311 rebounds?
SELECT team FROM table_name_27 WHERE games > 32 AND rebounds = 311
sql_create_context
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int,...
Are there any Core classes offered during the Winter ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour...
advising
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restr...
what are the flights on tuesday 10 1 from ATLANTA to BALTIMORE
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 = 'BALTIMORE' AND date_day.day_number = 1 AND date_day.month_number = 10 AND...
atis
CREATE TABLE table_28058 ( "Release" text, "# of discs" real, "Region 1" text, "Region 2" text, "Region 4" text )
How many region 1's did back to earth have?
SELECT COUNT("Region 1") FROM table_28058 WHERE "Release" = 'Back to Earth'
wikisql
CREATE TABLE table_1341472_12 ( incumbent VARCHAR, district VARCHAR )
Who was the incumbent of district Georgia 2?
SELECT incumbent FROM table_1341472_12 WHERE district = "Georgia 2"
sql_create_context
CREATE TABLE table_27091128_3 ( replaced_by VARCHAR, outgoing_manager VARCHAR )
Who replaced the outgoing manager H sn zkara?
SELECT replaced_by FROM table_27091128_3 WHERE outgoing_manager = "Hüsnü Özkara"
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age te...
what are the prices of a antibacterials - penicillins?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'treatment' AND cost.eventid IN (SELECT treatment.treatmentid FROM treatment WHERE treatment.treatmentname = 'antibacterials - penicillins')
eicu
CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME ) CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Course_Authors_and_Tutors ( author_id I...
A bar chart for what are the number of the completion dates of all the tests that have result 'Fail'?, sort bars in desc order.
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY date_of_completion ORDER BY date_of_completion DESC
nvbench
CREATE TABLE table_11590 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
Which airport is in Saudi Arabia when the ICAO is oejn?
SELECT "Airport" FROM table_11590 WHERE "Country" = 'saudi arabia' AND "ICAO" = 'oejn'
wikisql
CREATE TABLE table_name_13 ( league_from VARCHAR, nhl_team VARCHAR )
Which League from has a NHL team of san jose sharks (from carolina) 3?
SELECT league_from FROM table_name_13 WHERE nhl_team = "san jose sharks (from carolina) 3"
sql_create_context
CREATE TABLE table_name_20 ( player VARCHAR, country VARCHAR, to_par VARCHAR, score VARCHAR )
Who is the player from the United States with a 4 to par and a 74-73-72-69=288 score?
SELECT player FROM table_name_20 WHERE country = "united states" AND to_par = 4 AND score = 74 - 73 - 72 - 69 = 288
sql_create_context
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, countr...
Are 500 -level classes available in Spring or Summer term ?
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 500 AND 500 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = cou...
advising
CREATE TABLE table_name_92 ( top_10 INTEGER, events VARCHAR, cuts_made VARCHAR, top_5 VARCHAR )
Which top ten, having less than 12 cuts less than 2 top five, and events smaller than 14, is the highest?
SELECT MAX(top_10) FROM table_name_92 WHERE cuts_made < 12 AND top_5 < 2 AND events < 14
sql_create_context
CREATE TABLE table_57932 ( "Club/Team" text, "League" text, "Venue" text, "Established" real, "Premierships" text )
How many premierships for the commonwealth bank trophy league?
SELECT "Premierships" FROM table_57932 WHERE "League" = 'commonwealth bank trophy'
wikisql
CREATE TABLE table_name_35 ( score VARCHAR, date VARCHAR )
Name the score for 21 may 2011
SELECT score FROM table_name_35 WHERE date = "21 may 2011"
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 )
For those records from the products and each product's manufacturer, show me about the distribution of name and the sum of code , and group by attribute name in a bar chart, order x axis from high to low order.
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC
nvbench
CREATE TABLE table_22308881_2 ( in_county_tuition_per_credit_hour__fall_2009_ VARCHAR, college VARCHAR )
How much was the in-county tuition per credit hour at the Mercer College by the fall of 2009?
SELECT in_county_tuition_per_credit_hour__fall_2009_ FROM table_22308881_2 WHERE college = "Mercer"
sql_create_context
CREATE TABLE table_name_66 ( wins INTEGER, rank VARCHAR, country VARCHAR, player VARCHAR )
Which Wins is the highest one that has a Country of united states, and a Player of andy bean, and a Rank smaller than 4?
SELECT MAX(wins) FROM table_name_66 WHERE country = "united states" AND player = "andy bean" AND rank < 4
sql_create_context
CREATE TABLE table_26351260_1 ( enrollment INTEGER, institution VARCHAR )
What is the lowest enrollment for Eastern Michigan University?
SELECT MIN(enrollment) FROM table_26351260_1 WHERE institution = "Eastern Michigan University"
sql_create_context
CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text )
How many companies each investor has invested? Show me a pie chart.
SELECT Investor, COUNT(Investor) FROM entrepreneur GROUP BY Investor
nvbench
CREATE TABLE table_59293 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "St. Mirren Scorer(s)" text )
What was the Result at Strathclyde Homes Stadium?
SELECT "Result" FROM table_59293 WHERE "Venue" = 'strathclyde homes stadium'
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, ...
get me the number of patients admitted before 2203 who had coronary artery primary disease.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE" AND demographic.admityear < "2203"
mimicsql_data
CREATE TABLE table_name_77 ( airport VARCHAR, country VARCHAR )
What is the Airport in Singapore?
SELECT airport FROM table_name_77 WHERE country = "singapore"
sql_create_context
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...
Among patients who had icd9 code 5771, how many of them were a divorcee?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "DIVORCED" AND procedures.icd9_code = "5771"
mimicsql_data
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
how many black/haitian patients were aged below 80 years?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.age < "80"
mimicsql_data
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, Rejectio...
Combined PostHistory (question and all the answers).
SELECT p.Id, CASE WHEN (p.ParentId IS NULL) THEN 'Question' ELSE 'Answer' END, ph.PostHistoryTypeId, CASE ph.PostHistoryTypeId WHEN 1 THEN 'Initial Title' WHEN 2 THEN 'Initial Body' WHEN 3 THEN 'Initial Tags' WHEN 4 THEN 'Edit Title' WHEN 5 THEN 'Edit Body' WHEN 6 THEN 'Edit Tags' WHEN 7 THEN 'Initial Title' WHEN 8 THE...
sede
CREATE TABLE table_204_423 ( id number, "name" text, "location" text, "city" text, "listing date" text )
how many historic sites were listed in 1988 ?
SELECT COUNT("name") FROM table_204_423 WHERE "listing date" = 1988
squall
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, ...
what the last height of patient 9038 during their first hospital encounter.
SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9038 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevents.item...
mimic_iii
CREATE TABLE table_41740 ( "Date" text, "Opponent" text, "Location" text, "Score" text, "Loss" text, "Record" text )
What is the Location when the opponent shows vs. ole miss, and a Loss of mckean (4-1)?
SELECT "Location" FROM table_41740 WHERE "Opponent" = 'vs. ole miss' AND "Loss" = 'mckean (4-1)'
wikisql
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
what were the five most ordered microbiology tests for patients who have previously received beta blocker - metoprolol in the same month until 2104?
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'beta blocker - metoprolol' AND STRFTIME('%y'...
eicu
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
How many patients had s/p fall as their primary disease?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL"
mimicsql_data
CREATE TABLE table_40346 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
What is the Date of the 1999 fifa confederations cup?
SELECT "Date" FROM table_40346 WHERE "Competition" = '1999 fifa confederations cup'
wikisql
CREATE TABLE table_27780 ( "Position" real, "Sail number" text, "Yacht" text, "State/country" text, "Yacht type" text, "LOA (Metres)" text, "Skipper" text, "Corrected time d:hh:mm:ss" text )
What was Swish's corrected time?
SELECT "Corrected time d:hh:mm:ss" FROM table_27780 WHERE "Yacht" = 'Swish'
wikisql
CREATE TABLE table_19077 ( "Rd." real, "Race Title" text, "Circuit" text, "City / State" text, "Date" text, "Winner" text, "Team" text, "Report" text )
Who was the winner on the Symmons Plains Raceway?
SELECT "Winner" FROM table_19077 WHERE "Circuit" = 'Symmons Plains Raceway'
wikisql
CREATE TABLE table_name_96 ( place VARCHAR, points VARCHAR )
How many places have more than 33 points?
SELECT COUNT(place) FROM table_name_96 WHERE points = 33
sql_create_context
CREATE TABLE perpetrator ( Perpetrator_ID int, People_ID int, Date text, Year real, Location text, Country text, Killed int, Injured int ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, "Home Town" text )
Return a bar chart on what are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.
SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country
nvbench
CREATE TABLE table_name_82 ( viewers__m_ INTEGER, episode VARCHAR )
What Viewers (m) has an Episode of school council?
SELECT AVG(viewers__m_) FROM table_name_82 WHERE episode = "school council"
sql_create_context
CREATE TABLE table_50077 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text, "Points" real )
What is the date of the game with less than 35 points and chicago as the home team?
SELECT "Date" FROM table_50077 WHERE "Points" < '35' AND "Home" = 'chicago'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
把患者吕莉莉在二零零三年十二月二日到二零一三年八月十七日被开出的所有检验报告单的科室编码以及名称列出来
SELECT jybgb.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE person_info.XM = '吕...
css
CREATE TABLE Artwork ( Name VARCHAR, Artwork_ID VARCHAR ) CREATE TABLE nomination ( Name VARCHAR, Artwork_ID VARCHAR )
List the name of artworks that are not nominated.
SELECT Name FROM Artwork WHERE NOT Artwork_ID IN (SELECT Artwork_ID FROM nomination)
sql_create_context
CREATE TABLE table_204_87 ( id number, "courthouse" text, "city" text, "street address" text, "jurisdiction" text, "dates of use" text, "named for" text )
what is the name of the courthouse listed after federal building ?
SELECT "courthouse" FROM table_204_87 WHERE id = (SELECT id FROM table_204_87 WHERE "courthouse" = 'federal building' ORDER BY id DESC LIMIT 1) + 1
squall
CREATE TABLE table_name_32 ( team VARCHAR, games VARCHAR )
What is the team name that as games of 7?
SELECT team FROM table_name_32 WHERE games = "7"
sql_create_context
CREATE TABLE checking ( balance INTEGER ) CREATE TABLE accounts ( name VARCHAR, custid VARCHAR )
Find the name of accounts whose checking balance is below the average checking balance.
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT AVG(balance) FROM checking)
sql_create_context
CREATE TABLE table_name_15 ( city VARCHAR, airport VARCHAR )
Name the city that has singapore changi airport
SELECT city FROM table_name_15 WHERE airport = "singapore changi airport"
sql_create_context
CREATE TABLE table_41783 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
What is Set 4, when Set 5 is NA, and when Set 3 is 19-25?
SELECT "Set 4" FROM table_41783 WHERE "Set 5" = 'na' AND "Set 3" = '19-25'
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 prescriptions ( subject_id text, hadm_id...
give me the number of patients whose diagnoses icd9 code is 55221 and lab test fluid is pleural?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "55221" AND lab.fluid = "Pleural"
mimicsql_data
CREATE TABLE table_30957 ( "Episode" text, "First broadcast" text, "Andrew and Georgies guest" text, "Jamie and Johns guest Dermot OLeary replaced Jamie Redknapp as team captain for one week in series 3, episode 8." text, "Scores" text )
Which episode had Jamie and John's guest as Mike Tindall?
SELECT "Episode" FROM table_30957 WHERE "Jamie and Johns guest Dermot OLeary replaced Jamie Redknapp as team captain for one week in series 3, episode 8." = 'Mike Tindall'
wikisql
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE compartment_cla...
what airline is YX
SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'YX'
atis
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JY...
css
CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE aircraft (...
list flights from LAS VEGAS to PHOENIX
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 = 'LAS VEGAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOE...
atis
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...
医疗就诊24269888068中费用明细项目97020525044的处方号是多少?处方流水号是多少?
SELECT t_kc22.PRESCRIPTION_CODE, t_kc22.PRESCRIPTION_ID FROM t_kc22 WHERE t_kc22.MED_EXP_DET_ID = '97020525044'
css
CREATE TABLE table_29374 ( "Year" real, "Network(s)" text, "Bowl" text, "Play-by-play announcer" text, "Color analyst(s)" text, "Sideline reporter(s)" text, "Studio host(s)" text, "Studio analyst(s)" text, "TV Rating" text )
Name the number of bowl for lee corso, gene chizik and chip kelly
SELECT COUNT("Bowl") FROM table_29374 WHERE "Studio analyst(s)" = 'Lee Corso, Gene Chizik and Chip Kelly'
wikisql
CREATE TABLE table_name_26 ( games INTEGER, drawn INTEGER )
Which Games is the highest one that has a Drawn smaller than 0?
SELECT MAX(games) FROM table_name_26 WHERE drawn < 0
sql_create_context
CREATE TABLE table_name_84 ( sideline_reporters VARCHAR, color_commentator VARCHAR, pregame_analysts VARCHAR )
When John Harkes was the color commentator, and Alexi Lalas and Steve McManaman were the pregame analysts, who were the sideline reporters?
SELECT sideline_reporters FROM table_name_84 WHERE color_commentator = "john harkes" AND pregame_analysts = "alexi lalas and steve mcmanaman"
sql_create_context
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...
从01年3月9号到14年4月7号,患者姜和玉,836622这个指标怎么样
SELECT * FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy...
css
CREATE TABLE course ( course_id varchar(8), title varchar(50), dept_name varchar(20), credits numeric(2,0) ) CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE time_slot ( time_slot_id varchar(4), day varchar(1),...
List the number of departments for each building with a bar chart, show by the how many building from high to low.
SELECT building, COUNT(building) FROM department GROUP BY building ORDER BY COUNT(building) DESC
nvbench
CREATE TABLE table_name_84 ( money_spent VARCHAR, _2q VARCHAR, candidate VARCHAR )
Name the money spent for 2Q having candidate of john mccain
SELECT money_spent, _2q FROM table_name_84 WHERE candidate = "john mccain"
sql_create_context
CREATE TABLE table_38163 ( "Season" real, "Belonging league" text, "Matches" real, "Points" real, "Draw" real, "Lose" real, "Goal difference" real, "Goals For" real, "Goals Against" real, "Position" real )
What is the lowest goals for value with fewer than 5 draws and under 70 points?
SELECT MIN("Goals For") FROM table_38163 WHERE "Draw" < '5' AND "Points" < '70'
wikisql
CREATE TABLE table_74600 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the lowest crowd size at the Windy Hill venue?
SELECT MIN("Crowd") FROM table_74600 WHERE "Venue" = 'windy hill'
wikisql
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, what is the relationship between manufacturer and code ?
SELECT T1.Manufacturer, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
nvbench
CREATE TABLE table_name_6 ( frequency_mhz VARCHAR, city_of_license VARCHAR )
What is the Frequency MHz of Trinidad, Colorado?
SELECT frequency_mhz FROM table_name_6 WHERE city_of_license = "trinidad, colorado"
sql_create_context
CREATE TABLE table_52868 ( "Player" text, "Att." real, "Comp" real, "Yards" real, "Rating" real )
What was the Comp average, having Gino Guidugli as a player and a rating of more than 92.2?
SELECT AVG("Comp") FROM table_52868 WHERE "Player" = 'gino guidugli' AND "Rating" > '92.2'
wikisql
CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text ) CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text )
Visualize a bar chart for what is the number of their teams in elimination?
SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team
nvbench
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...
how many patients whose primary disease is hypoxia and procedure short title is suture bladder lacerat?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "HYPOXIA" AND procedures.short_title = "Suture bladder lacerat"
mimicsql_data
CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE player ( pid number, pname text, ycard text, hs number )
How many colleges has more than 15000 students?
SELECT COUNT(*) FROM college WHERE enr > 15000
spider
CREATE TABLE table_50838 ( "Date" text, "Opponent" text, "Score" text, "Leading Scorer" text, "Attendance" real, "Record" text )
Which Leading Scorer has an Opponent of @ indiana?
SELECT "Leading Scorer" FROM table_50838 WHERE "Opponent" = '@ indiana'
wikisql
CREATE TABLE table_42397 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Result" text )
What is the Original title of Children of Sarajevo?
SELECT "Original title" FROM table_42397 WHERE "Film title used in nomination" = 'children of sarajevo'
wikisql
CREATE TABLE table_2127933_3 ( outcome VARCHAR, opponents VARCHAR )
What were the outcomes of matches with bill tilden florence ballin as opponents?
SELECT outcome FROM table_2127933_3 WHERE opponents = "Bill Tilden Florence Ballin"
sql_create_context
CREATE TABLE table_name_97 ( name VARCHAR, took_office VARCHAR )
Which deputy took office in 1976?
SELECT name FROM table_name_97 WHERE took_office = "1976"
sql_create_context
CREATE TABLE table_23749 ( "Date" text, "Time" text, "Big East Team" text, "SEC Team" text, "Location" text, "Television" text, "Attendance" real, "Winner" text, "Challenge Leader" text )
What was the attendance for the game when the challenge leader was at Big East (4-2)?
SELECT MAX("Attendance") FROM table_23749 WHERE "Challenge Leader" = 'Big East (4-2)'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
calculate the number of times patient 030-6898 received the bedside glucose test test since 3 years ago.
SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-6898')) AND lab.labname = 'bedside glucose' AND DATETIME(lab.labresulttime) >= DATETIME(...
eicu
CREATE TABLE list ( LastName TEXT, FirstName TEXT, Grade INTEGER, Classroom INTEGER ) CREATE TABLE teachers ( LastName TEXT, FirstName TEXT, Classroom INTEGER )
Scatter. how many students does one classroom have?
SELECT COUNT(*), Classroom FROM list GROUP BY Classroom
nvbench
CREATE TABLE orders ( order_id number, customer_id number, date_order_placed time, order_details text ) CREATE TABLE invoices ( invoice_number number, order_id number, invoice_date time ) CREATE TABLE accounts ( account_id number, customer_id number, date_account_opened time, ...
Show the order ids and the number of items in each order.
SELECT order_id, COUNT(*) FROM order_items GROUP BY order_id
spider
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 procedures ( ...
provide the number of patients whose year of birth is less than 2098 and drug route is dialys?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2098" AND prescriptions.route = "DIALYS"
mimicsql_data
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Comments ( Id...
View count statistics by age group (grouped by month).
SELECT DISTINCT (DATEDIFF(MONTH, CreationDate, GETDATE())) AS "Age in months", PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY ViewCount) OVER (PARTITION BY DATEDIFF(MONTH, CreationDate, GETDATE())) AS "25%", PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY ViewCount) OVER (PARTITION BY DATEDIFF(MONTH, CreationDate, GETDATE())...
sede
CREATE TABLE table_name_55 ( to_par VARCHAR, score VARCHAR )
What is the to par of the player with a 72-71-65-69=277 score?
SELECT to_par FROM table_name_55 WHERE score = 72 - 71 - 65 - 69 = 277
sql_create_context
CREATE TABLE table_2848 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Which team has the location attendance of American Airlines Center 19954?
SELECT "Team" FROM table_2848 WHERE "Location Attendance" = 'American Airlines Center 19954'
wikisql
CREATE TABLE table_1715730_2 ( founded VARCHAR, institution VARCHAR )
what is the year union university was founded?
SELECT founded FROM table_1715730_2 WHERE institution = "Union University"
sql_create_context
CREATE TABLE Customers ( customer_details VARCHAR, customer_id VARCHAR, Customer_id VARCHAR ) CREATE TABLE Customer_Policies ( customer_id VARCHAR, policy_id VARCHAR ) CREATE TABLE Claims ( policy_id VARCHAR )
Which customer had at least 2 policies but did not file any claims? List the customer details and id.
SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 2 EXCEPT SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id JOIN Claims ...
sql_create_context
CREATE TABLE table_54810 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
How many people attended the game where the leading scorer was Tim Duncan (24), and the home team was the Spurs?
SELECT MIN("Attendance") FROM table_54810 WHERE "Leading scorer" = 'tim duncan (24)' AND "Home" = 'spurs'
wikisql
CREATE TABLE table_31506 ( "Townland" text, "Area( acres )" real, "Barony" text, "Civil parish" text, "Poor law union" text )
Which townland has a 213 acre area?
SELECT "Townland" FROM table_31506 WHERE "Area( acres )" = '213'
wikisql
CREATE TABLE table_name_63 ( top_25 INTEGER, cuts_made VARCHAR, events VARCHAR, top_5 VARCHAR )
What is the lowest Top-25 when events shows 12, the top-5 is 1, and less than 11 cuts?
SELECT MIN(top_25) FROM table_name_63 WHERE events = 12 AND top_5 = 1 AND cuts_made < 11
sql_create_context
CREATE TABLE table_17335 ( "#" real, "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" text, "Record" text, "Streak" text )
Who was the leading scorer in Game #26?
SELECT "Leading scorer" FROM table_17335 WHERE "#" = '26'
wikisql
CREATE TABLE table_36793 ( "Body" text, "Equatorial diameter" text, "Polar diameter" text, "Equatorial bulge" text, "Flattening ratio" text )
What is the Equatorial diameter of the Body: Mars?
SELECT "Equatorial diameter" FROM table_36793 WHERE "Body" = 'mars'
wikisql
CREATE TABLE table_26427332_17 ( contestant VARCHAR, city VARCHAR )
who are the participants from hanover?
SELECT contestant FROM table_26427332_17 WHERE city = "Hanover"
sql_create_context
CREATE TABLE table_5729 ( "Name" text, "Position" text, "Height" text, "Weight" real, "Year" text, "Home Town" text )
What is the average weight of Jeremy Case, who plays guard?
SELECT AVG("Weight") FROM table_5729 WHERE "Position" = 'guard' AND "Name" = 'jeremy case'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, ...
in their first hospital encounter had patient 9038 received a sm bowel endoscopy nec procedure?
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'sm bowel endoscopy nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9038 AND NOT admissions....
mimic_iii
CREATE TABLE table_584 ( "Institution" text, "Location" text, "Nickname" text, "Current Conference" text, "Classification" text )
What current conference is Post University a member of?
SELECT "Current Conference" FROM table_584 WHERE "Institution" = 'Post University'
wikisql
CREATE TABLE table_name_12 ( runner_up VARCHAR, margin_of_victory VARCHAR )
Which runner-up has a 10 strokes margin of victory?
SELECT runner_up FROM table_name_12 WHERE margin_of_victory = "10 strokes"
sql_create_context
CREATE TABLE table_33701 ( "Episode Number" real, "Title" text, "Podcast Date" text, "Run time" text, "Historical References" text )
What is the episode number of the episode that aired on August 8, 2005?
SELECT "Episode Number" FROM table_33701 WHERE "Podcast Date" = 'august 8, 2005'
wikisql
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...
how many patients whose admission location is emergency room admit and item id is 51131?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND lab.itemid = "51131"
mimicsql_data
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE hz_info ( KH text, KLX number...
询问一下患者98644163往常有过什么异常情况吗?
SELECT * FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON 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_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE hz_inf...
css
CREATE TABLE table_30508 ( "Pick" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
Which team drafted the player from the HC Lada Togliatti (Russia)?
SELECT "NHL team" FROM table_30508 WHERE "College/junior/club team" = 'HC Lada Togliatti (Russia)'
wikisql
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
Is STDABRD 485 scheduled for morning classes ?
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'STDABRD' AND course.number = 485 AND semester.semester = 'WN' AND semester.semester_id = course_...
advising
CREATE TABLE table_name_3 ( ihsaa_class VARCHAR, school VARCHAR )
What is the IHSAA class for Tipton?
SELECT ihsaa_class FROM table_name_3 WHERE school = "tipton"
sql_create_context
CREATE TABLE table_name_3 ( career_win_loss VARCHAR )
What is the career win-loss for the ATP Masters Series?
SELECT career_win_loss FROM table_name_3 WHERE 1995 = "atp masters series"
sql_create_context