context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_23353 ( "School" text, "City / Town" text, "Website" text, "Size" real, "Principal" text, "Grades" text, "IDOE Profile" text )
What is the name of the school/s in North Manchester?
SELECT "School" FROM table_23353 WHERE "City / Town" = 'North Manchester'
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
how many patients whose insurance is medicare and lab test name is albumin/creatinine, urine?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Medicare" AND lab.label = "Albumin/Creatinine, Urine"
mimicsql_data
CREATE TABLE table_name_7 ( competition VARCHAR, score VARCHAR )
Which Competition has a Score of 2-0?
SELECT competition FROM table_name_7 WHERE score = "2-0"
sql_create_context
CREATE TABLE table_17378 ( "Index (Year)" text, "Author / Editor / Source" text, "Year of publication" text, "Countries sampled" real, "World Ranking (1)" text, "Ranking L.A. (2)" text )
how many countries sampled with year of publication being 2007 and ranking l.a. (2) being 7th
SELECT COUNT("Countries sampled") FROM table_17378 WHERE "Year of publication" = '2007' AND "Ranking L.A. (2)" = '7th'
wikisql
CREATE TABLE table_25211 ( "District name" text, "Dist. ID" real, "ISD" text, "County" text, "Authorizing agency" text, "Date opened" text, "Services" text )
If the district ID is 74907, what is the name of the district?
SELECT "District name" FROM table_25211 WHERE "Dist. ID" = '74907'
wikisql
CREATE TABLE table_63558 ( "Rank" real, "Lane" real, "Athlete" text, "Nationality" text, "Time" real, "React" real )
What is the lowest lane in which an athlete got a time larger than 20.75 and a react smaller than 0.166?
SELECT MIN("Lane") FROM table_63558 WHERE "Time" > '20.75' AND "React" < '0.166'
wikisql
CREATE TABLE table_11214772_1 ( runner_up VARCHAR, year VARCHAR, champion VARCHAR )
who is the runner-up where year is 2004 and champion is north carolina state
SELECT runner_up FROM table_11214772_1 WHERE year = "2004" AND champion = "North Carolina State"
sql_create_context
CREATE TABLE table_21062353_1 ( opponent VARCHAR, game VARCHAR )
Who were the the opponents of the Wildcats for game 8 of the season?
SELECT opponent FROM table_21062353_1 WHERE game = 8
sql_create_context
CREATE TABLE table_4343 ( "Country/Region" text, "Name" text, "Host" text, "Network" text, "Premiere" text, "Prize" text )
Tell me the 13 january 2009 host
SELECT "Host" FROM table_4343 WHERE "Premiere" = '13 january 2009'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
what is date of birth of subject name jerry deberry?
SELECT demographic.dob FROM demographic WHERE demographic.name = "Jerry Deberry"
mimicsql_data
CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Na...
What are the id of each employee and the number of document destroyed by that employee. Visualize by scatter chart.
SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_Destroyed GROUP BY Destroyed_by_Employee_ID
nvbench
CREATE TABLE table_26748 ( "Position" text, "Name" text, "Nationality" text, "Event 1 Medley" text, "Event 2 Truck Pull" text, "Event 3 Dead Lift" text, "Event 4 Fingals Fingers" text, "Event 5 Keg Toss" text, "Event 6 Atlas Stones" text )
What is the score in the 6 atlas stones event of the player who got 2 (6 in 30.89s) in the 3 dead lift event?
SELECT COUNT("Event 6 Atlas Stones") FROM table_26748 WHERE "Event 3 Dead Lift" = '2 (6 in 30.89s)'
wikisql
CREATE TABLE table_name_26 ( school_club_team VARCHAR, pick INTEGER )
What is the school/club team of the player with a pick larger than 83?
SELECT school_club_team FROM table_name_26 WHERE pick > 83
sql_create_context
CREATE TABLE table_51328 ( "CERCLIS ID" text, "Name" text, "Municipality" text, "Proposed" text, "Listed" text, "Construction completed" text, "Partially deleted" text, "Deleted" text )
What site in the RCA Del Caribe was deleted?
SELECT "Deleted" FROM table_51328 WHERE "Name" = 'rca del caribe'
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,...
医院1833407自2010年7月26日至2011年7月21日,将近一年的时间门诊和住院一共医治过多少患者
SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '1833407' AND IN_HOSP_DATE BETWEEN '2010-07-26' AND '2011-07-21'
css
CREATE TABLE Apartment_Buildings ( building_id INTEGER, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80) ) CREATE TABLE Apartments ( apt_id INTEGER, ...
Show the number of apartment bookings for each year and bin booking start date by year interval in a bar chart, and show by the Y in descending.
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id ORDER BY COUNT(booking_start_date) DESC
nvbench
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
count the number of patients whose admission type is elective and ethnicity is white - russian?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.ethnicity = "WHITE - RUSSIAN"
mimicsql_data
CREATE TABLE table_2292 ( "No. in series" real, "No. in season" real, "Title" text, "Directedby" text, "Writtenby" text, "Originalairdate" text, "Production code" text, "U.S. viewers (million)" text )
Who directed the episode with a production code of 4WAB04?
SELECT "Directedby" FROM table_2292 WHERE "Production code" = '4WAB04'
wikisql
CREATE TABLE table_204_235 ( id number, "season" text, "team" text, "country" text, "competition" text, "matches" number, "goals" number )
what was the number of goals he scored in 2005 ?
SELECT "goals" FROM table_204_235 WHERE "season" = 2005
squall
CREATE TABLE table_60263 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" real )
What was their record when they played at Riverfront Stadium?
SELECT "Record" FROM table_60263 WHERE "Game site" = 'riverfront stadium'
wikisql
CREATE TABLE table_name_13 ( week_10_nov_5 VARCHAR, week_9_oct_29 VARCHAR )
What is the week 10 result where the week 9 result was Dropped: Maryland South Carolina?
SELECT week_10_nov_5 FROM table_name_13 WHERE week_9_oct_29 = "dropped: maryland south carolina"
sql_create_context
CREATE TABLE table_name_25 ( record VARCHAR, opponent VARCHAR )
Tell me the record for kazuhiro nakamura
SELECT record FROM table_name_25 WHERE opponent = "kazuhiro nakamura"
sql_create_context
CREATE TABLE table_67904 ( "Match" real, "Date" text, "Tournament" text, "Location" text, "Opponent team" text, "Score" text )
What match number took place on August 3, 2007?
SELECT MAX("Match") FROM table_67904 WHERE "Date" = 'august 3, 2007'
wikisql
CREATE TABLE table_42238 ( "Television service" text, "Country" text, "Language" text, "Content" text, "HDTV" text, "Package/Option" text )
What language is used when the service is sky primafila 10 and the package/option is qualsiasi?
SELECT "Language" FROM table_42238 WHERE "Package/Option" = 'qualsiasi' AND "Television service" = 'sky primafila 10'
wikisql
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
Draw a bar chart of decor versus minimal baseprice, order by the total number in descending.
SELECT decor, MIN(basePrice) FROM Rooms GROUP BY decor ORDER BY MIN(basePrice) DESC
nvbench
CREATE TABLE table_204_70 ( id number, "pick #" number, "nfl team" text, "player" text, "position" text, "college" text )
who was the first player chosen by the cincinnati bengals , in round seven ?
SELECT "player" FROM table_204_70 WHERE "nfl team" = 'cincinnati bengals' ORDER BY "pick #" LIMIT 1
squall
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, ...
对于编号是35540831的这个病患其检验报告单的报告日期全部在二一年十二月十五号以前的住院就诊记录以及住院就诊流水号有啥?
SELECT wdmzjzjlb.JZLSH FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '35540831' AND NOT wdmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2012-12-15') UNION SELECT bdmzjzjlb.JZLSH FROM hz_info JOIN...
css
CREATE TABLE movie ( mid number, title text, year number, director text ) CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) CREATE TABLE reviewer ( rid number, name text )
What is the name of the movie that has been reviewed the most?
SELECT T2.title, T1.mid FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid GROUP BY T1.mid ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
what is language of subject name kelly gallardo?
SELECT demographic.language FROM demographic WHERE demographic.name = "Kelly Gallardo"
mimicsql_data
CREATE TABLE table_name_14 ( week VARCHAR, date VARCHAR )
What week number did November 19, 1989 games fall on?
SELECT week FROM table_name_14 WHERE date = "november 19, 1989"
sql_create_context
CREATE TABLE table_31486 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
Which CFL team got pick 34?
SELECT "CFL Team" FROM table_31486 WHERE "Pick #" = '34'
wikisql
CREATE TABLE table_15872814_3 ( team VARCHAR, date VARCHAR )
Name the team for november 9
SELECT team FROM table_15872814_3 WHERE date = "November 9"
sql_create_context
CREATE TABLE table_67473 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text )
What is the callsign of the 5kW Sonshine Radio Cotabato?
SELECT "Callsign" FROM table_67473 WHERE "Power (kW)" = '5kw' AND "Branding" = 'sonshine radio cotabato'
wikisql
CREATE TABLE journal_committee ( Editor_ID int, Journal_ID int, Work_Type text ) CREATE TABLE editor ( Editor_ID int, Name text, Age real ) CREATE TABLE journal ( Journal_ID int, Date text, Theme text, Sales int )
Draw a bar chart of name versus age
SELECT Name, Age FROM editor
nvbench
CREATE TABLE table_24574438_1 ( indian_tamil INTEGER, population_density___km_2__ VARCHAR )
Name the least indian tamil for population density being 240
SELECT MIN(indian_tamil) FROM table_24574438_1 WHERE population_density___km_2__ = 240
sql_create_context
CREATE TABLE table_name_26 ( year INTEGER, position VARCHAR, player VARCHAR )
What year is center Ann Wauters?
SELECT SUM(year) FROM table_name_26 WHERE position = "center" AND player = "ann wauters"
sql_create_context
CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TE...
Give me a line chart about each year's maximum score , and rank by the x-axis in descending.
SELECT Year, MAX(Score) FROM wine GROUP BY Year ORDER BY Year DESC
nvbench
CREATE TABLE table_70740 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
What was the score of the game that had a record of 26 13 4 2 and a decision of Joseph?
SELECT "Score" FROM table_70740 WHERE "Decision" = 'joseph' AND "Record" = '26–13–4–2'
wikisql
CREATE TABLE table_256286_40 ( passed VARCHAR, description VARCHAR )
What vote passed for the measure with the description, authorizing state acceptance of certain gifts?
SELECT passed FROM table_256286_40 WHERE description = "Authorizing State Acceptance of Certain Gifts"
sql_create_context
CREATE TABLE table_203_741 ( id number, "season" text, "competition" text, "round" text, "opponent" text, "home" text, "away" text, "aggregate" text )
what was their 1qr opponent in 2010-2011 ?
SELECT "opponent" FROM table_203_741 WHERE "round" = '1qr' AND "season" = '2010-11'
squall
CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varc...
please give me the flights available from BOSTON to PITTSBURGH on wednesday of next week
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 = 'PITTSBURGH' AND date_day.day_number = 23 AND date_day.month_number = 4 AN...
atis
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...
50197380603门诊就诊中患者的身高和体重如何?他的体温、收缩压、舒张压、心率、呼吸频率、脉率的具体数据呢
SELECT wdmzjzjlb.SG, wdmzjzjlb.TZ, wdmzjzjlb.TW, wdmzjzjlb.SSY, wdmzjzjlb.SZY, wdmzjzjlb.XL, wdmzjzjlb.HXPLC, wdmzjzjlb.ML FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '50197380603' UNION SELECT bdmzjzjlb.SG, bdmzjzjlb.TZ, bdmzjzjlb.TW, bdmzjzjlb.SSY, bdmzjzjlb.SZY, bdmzjzjlb.XL, bdmzjzjlb.HXPLC, bdmzjzjlb.ML FROM bdmzjzjlb ...
css
CREATE TABLE table_name_25 ( event_place VARCHAR, time VARCHAR )
Where did someone run a 58:33?
SELECT event_place FROM table_name_25 WHERE time = "58:33"
sql_create_context
CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password...
Return the number of the completion date for all the tests that have 'Fail' result, and I want to display in asc by the y axis.
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" ORDER BY COUNT(date_of_completion)
nvbench
CREATE TABLE table_203_166 ( id number, "pos" text, "no" number, "rider" text, "manufacturer" text, "laps" number, "time" text, "grid" number, "points" number )
how many honda motorcycles completed the race ?
SELECT COUNT(*) FROM table_203_166 WHERE "manufacturer" = 'honda'
squall
CREATE TABLE table_69512 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
Name the opponent with attendance of 31,777
SELECT "Opponent" FROM table_69512 WHERE "Attendance" = '31,777'
wikisql
CREATE TABLE table_33935 ( "Year" real, "Team" text, "Wins" real, "Points" real, "Championship Finish" text )
Which Points have a Year larger than 1998, and Wins of 1?
SELECT AVG("Points") FROM table_33935 WHERE "Year" > '1998' AND "Wins" = '1'
wikisql
CREATE TABLE table_68737 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Pts." real )
Which chassis has a year later than 1964, a Ford engine, and 13 points?
SELECT "Chassis" FROM table_68737 WHERE "Year" > '1964' AND "Engine" = 'ford' AND "Pts." = '13'
wikisql
CREATE TABLE table_name_7 ( opponent VARCHAR, date VARCHAR )
What is Opponent, when Date is December 18, 1988?
SELECT opponent FROM table_name_7 WHERE date = "december 18, 1988"
sql_create_context
CREATE TABLE loan ( loan_id text, loan_type text, cust_id text, branch_id text, amount number ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, acc_bal number, no_of_loans number, credit_score number, branch_id number, state text ) CREATE TABLE ...
What are the different names and credit scores of customers who have taken a loan?
SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id
spider
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...
标本在检验报告单90373128811里的采集部位是哪里?
SELECT jybgb.BBCJBW FROM jybgb WHERE jybgb.BGDH = '90373128811'
css
CREATE TABLE table_name_45 ( production_company VARCHAR, year VARCHAR )
Which production company has the year of 2005 listed?
SELECT production_company FROM table_name_45 WHERE year = "2005"
sql_create_context
CREATE TABLE wdmzjzjlb ( 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...
64287856这个患者以前就诊的地方是哪里?
SELECT wdmzjzjlb.YLJGDM FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '64287856' UNION SELECT bdmzjzjlb.YLJGDM FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_info.KH = bdmzjzjlb.KH AND hz_info....
css
CREATE TABLE Draft_Copies ( document_id INTEGER, draft_number INTEGER, copy_number INTEGER ) CREATE TABLE Employees ( employee_id INTEGER, role_code CHAR(15), employee_name VARCHAR(255), other_details VARCHAR(255) ) CREATE TABLE Documents ( document_id INTEGER, document_status_code...
Show the number of documents for each receipt date and bin by year with a line chart, sort by the x-axis in desc please.
SELECT receipt_date, COUNT(receipt_date) FROM Documents ORDER BY receipt_date DESC
nvbench
CREATE TABLE table_name_27 ( date VARCHAR, goal VARCHAR )
What was the date of the game with a goal of 7?
SELECT date FROM table_name_27 WHERE goal = 7
sql_create_context
CREATE TABLE table_name_83 ( game_site VARCHAR, opponent VARCHAR )
What is the game site of the game with the san diego chargers as the opponent?
SELECT game_site FROM table_name_83 WHERE opponent = "san diego chargers"
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...
how many patients on prochlorperazine prescription have american indian/alaska native ethnic background?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND prescriptions.drug = "Prochlorperazine"
mimicsql_data
CREATE TABLE table_41960 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
What is the name of the tournament played on Sep 20, 1981, ending with a margin of vicroty of 2 strokes?
SELECT "Tournament" FROM table_41960 WHERE "Margin of victory" = '2 strokes' AND "Date" = 'sep 20, 1981'
wikisql
CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text )
What is the average age of captains in different classes?, and could you order in descending by the mean age please?
SELECT Class, AVG(age) FROM captain GROUP BY Class ORDER BY AVG(age) DESC
nvbench
CREATE TABLE table_23662272_4 ( couple VARCHAR, number_of_dances VARCHAR )
What was the name of the couple if the number of dances is 6?
SELECT couple FROM table_23662272_4 WHERE number_of_dances = 6
sql_create_context
CREATE TABLE table_203_877 ( id number, "year" number, "single" text, "us cashbox" number, "us hot 100" number, "uk singles" number )
which single spent the least amount of time on the us hot 100 ?
SELECT "single" FROM table_203_877 ORDER BY "us hot 100" LIMIT 1
squall
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 ) ...
provide me with the birth date and discharge location of patient jerry deberry.
SELECT demographic.dob, demographic.discharge_location FROM demographic WHERE demographic.name = "Jerry Deberry"
mimicsql_data
CREATE TABLE table_31074 ( "Train Number" real, "Train Name" text, "Departure Pune" text, "Arrival Lonavla" text, "Frequency" text, "Origin" text )
how many trains have the number 99808
SELECT COUNT("Train Name") FROM table_31074 WHERE "Train Number" = '99808'
wikisql
CREATE TABLE table_12459 ( "year" text, "opus" text, "town" text, "kind" text, "manuals" text, "stops" text )
What manuals have the opus of 135?
SELECT "manuals" FROM table_12459 WHERE "opus" = '135'
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...
count the number of patients whose diagnoses short title is dermatitis nos and lab test fluid is urine?
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.short_title = "Dermatitis NOS" AND lab.fluid = "Urine"
mimicsql_data
CREATE TABLE table_name_14 ( state VARCHAR, electorate VARCHAR )
Which State has an Electorate of Barton?
SELECT state FROM table_name_14 WHERE electorate = "barton"
sql_create_context
CREATE TABLE table_name_64 ( pos VARCHAR, name VARCHAR )
What is Eftychia Karagianni Pos.?
SELECT pos FROM table_name_64 WHERE name = "eftychia karagianni"
sql_create_context
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, ...
calculate the number of patients with diagnosis prim cardiomyopathy nec who had emergency hospital admission.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.short_title = "Prim cardiomyopathy NEC"
mimicsql_data
CREATE TABLE table_10191 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
Who did the cubs play on june 3?
SELECT "Opponent" FROM table_10191 WHERE "Date" = 'june 3'
wikisql
CREATE TABLE table_name_50 ( style VARCHAR, first_performance VARCHAR )
What is the Style of the First Performance of Billy Elliot on 15 November 2007?
SELECT style FROM table_name_50 WHERE first_performance = "15 november 2007"
sql_create_context
CREATE TABLE table_58249 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
Which Date has a Record of 6-9?
SELECT "Date" FROM table_58249 WHERE "Record" = '6-9'
wikisql
CREATE TABLE table_name_54 ( margin_of_victory VARCHAR, tournament VARCHAR )
What is the Margin of victory at the Bob Hope Desert Classic Tournament?
SELECT margin_of_victory FROM table_name_54 WHERE tournament = "bob hope desert classic"
sql_create_context
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 lab ( subject_id text, hadm_id text, ...
get me the number of emergency hospital admission patients who have lab test item id 50801.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.itemid = "50801"
mimicsql_data
CREATE TABLE table_name_20 ( league VARCHAR, fa_cup VARCHAR )
What is the value for the League Cup when the FA Cup value is 0 13 0 (49)?
SELECT league AS Cup FROM table_name_20 WHERE fa_cup = "0 13 0 (49)"
sql_create_context
CREATE TABLE table_15222 ( "Team" text, "Car(s)" text, "Driver(s)" text, "Primary Sponsor(s)" text, "Owner(s)" text, "Crew Chief" text )
What primary sponsor has the owner Rick Hendrick and their crew chief is Alan Gustafson?
SELECT "Primary Sponsor(s)" FROM table_15222 WHERE "Owner(s)" = 'rick hendrick' AND "Crew Chief" = 'alan gustafson'
wikisql
CREATE TABLE table_203_365 ( id number, "released" text, "video title" text, "company" text, "director" text, "notes" text )
name the first pornographic film listed on the table .
SELECT "video title" FROM table_203_365 ORDER BY id LIMIT 1
squall
CREATE TABLE table_203_523 ( id number, "state" text, "swimsuit" number, "interview" number, "evening gown" number, "average" number, "finalists" number )
what is the difference in points between the finalists and average in iowa ?
SELECT "finalists" - "average" FROM table_203_523 WHERE "state" = 'iowa'
squall
CREATE TABLE field ( fieldid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE dataset ...
papers that used NELL
SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset WHERE dataset.datasetname = 'NELL' AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid
scholar
CREATE TABLE table_name_90 ( cultural_and_educational_panel INTEGER, industrial_and_commercial_panel VARCHAR, agricultural_panel VARCHAR )
What is the total of the cultural and educational panel when the industrial and commercial panel is 0 and the agricultural panel is greater than 0?
SELECT SUM(cultural_and_educational_panel) FROM table_name_90 WHERE industrial_and_commercial_panel = 0 AND agricultural_panel > 0
sql_create_context
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0),...
For those employees who was hired before 2002-06-21, show me about the distribution of hire_date and the average of salary bin hire_date by time in a bar chart, and rank by the y axis in descending.
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(SALARY) DESC
nvbench
CREATE TABLE table_14069 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text )
Rank of 6 has what time?
SELECT "Time" FROM table_14069 WHERE "Rank" = '6'
wikisql
CREATE TABLE table_name_31 ( college_junior_club_team__league_ VARCHAR, round VARCHAR )
What College team has 8 rounds?
SELECT college_junior_club_team__league_ FROM table_name_31 WHERE round = 8
sql_create_context
CREATE TABLE table_69893 ( "Date" text, "Bowl" text, "Result" text, "Points For" real, "Points Against" real )
What was the final result when the Mountaineers scored less than 13 and their opponents scored 26?
SELECT "Result" FROM table_69893 WHERE "Points For" < '13' AND "Points Against" = '26'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( la...
tell me the test that was last given to patient 035-4428 in 08/last year?
SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-4428')) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), '...
eicu
CREATE TABLE table_50504 ( "Year" real, "Team" text, "Co-Drivers" text, "Class" text, "Laps" real, "Pos." text, "Class Pos." text )
Which team has finished in 1st place in 2011?
SELECT "Team" FROM table_50504 WHERE "Pos." = '1st' AND "Year" = '2011'
wikisql
CREATE TABLE table_71337 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
What is the total attendance for the August 8 game?
SELECT SUM("Attendance") FROM table_71337 WHERE "Date" = 'august 8'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
what is days of hospital stay and death status of subject id 74032?
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "74032"
mimicsql_data
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 class_of_service ( booking_class varchar, rank int, class_description text ) CREATE ...
i'd like to get a flight leaving SAN FRANCISCO and arriving at PHILADELPHIA pennsylvania
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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '...
atis
CREATE TABLE table_60921 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
In what place(s) did the player(s) with a total less than 282 finish?
SELECT "Finish" FROM table_60921 WHERE "Total" < '282'
wikisql
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, give me the comparison about revenue over the name , and group by attribute founder by a bar chart.
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name
nvbench
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
喻秀敏这个患者的医疗记录中哪几次被开过金额超过8393.94元的药品?查一下这个医疗就诊的编码
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '喻秀敏' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 8393.94)
css
CREATE TABLE table_name_34 ( callsign VARCHAR, commenced_operations VARCHAR )
What callsign has commenced operations in 2011?
SELECT callsign FROM table_name_34 WHERE commenced_operations = 2011
sql_create_context
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, show me about the distribution of name and revenue , and group by attribute founder in a bar chart.
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name
nvbench
CREATE TABLE table_name_77 ( date VARCHAR, loss VARCHAR )
What was the date of the Mariners game that had a loss of Segui (0-5)?
SELECT date FROM table_name_77 WHERE loss = "segui (0-5)"
sql_create_context
CREATE TABLE table_38901 ( "Pos." real, "Car #" real, "Driver" text, "Make" text, "Team" text )
How many Pos have a Driver of todd bodine, and a Car # larger than 30?
SELECT COUNT("Pos.") FROM table_38901 WHERE "Driver" = 'todd bodine' AND "Car #" > '30'
wikisql
CREATE TABLE table_204_867 ( id number, "number" number, "date" text, "name" text, "age\n(at execution)" number, "age\n(at offense)" number, "race" text, "state" text, "method" text )
how many women were above the age of 45 when executed ?
SELECT COUNT(*) FROM table_204_867 WHERE "age\n(at execution)" > 45
squall
CREATE TABLE table_5020 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School/Club Team" text )
What is recorded as the lowest Round for the Player Jim Thompson?
SELECT MIN("Round") FROM table_5020 WHERE "Player" = 'jim thompson'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
what is the average age of patients whose primary disease is copd exacerbation and who were admitted in or after year 2166?
SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "COPD EXACERBATION" AND demographic.admityear >= "2166"
mimicsql_data
CREATE TABLE table_15763 ( "Position" real, "Club" text, "Played" real, "Points" text, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
Name the least goals when position is more than 4 and draws is more than 11
SELECT MIN("Goals for") FROM table_15763 WHERE "Position" > '4' AND "Draws" > '11'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TAB...
what are the three commonest prescribed drugs for patients who previously were prescribed calcium chloride within 2 months until 2104?
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'calcium chloride' AND STRFTIME('%y', medication.dru...
eicu