context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_31766 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
Tell me the opponent for attendance of 68,264
SELECT "Opponent" FROM table_31766 WHERE "Attendance" = '68,264'
wikisql
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, ...
how many patients are admitted in the emergency and procedured with icd9 code 4576?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.icd9_code = "4576"
mimicsql_data
CREATE TABLE table_name_56 ( losses INTEGER, team VARCHAR, goals_against VARCHAR )
What is the sum of the losses by the Montreal Hockey Club, who have more than 15 Goals Against?
SELECT SUM(losses) FROM table_name_56 WHERE team = "montreal hockey club" AND goals_against > 15
sql_create_context
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, ...
Is meta? - check for WikiPlaceholder posts.
SELECT @is_meta_site
sede
CREATE TABLE table_203_161 ( id number, "pos." text, "div." number, "no." number, "team" text, "drivers" text, "car" text, "laps" number, "qual.\npos." number )
how many teams had less than five qualifying positions ?
SELECT COUNT("team") FROM table_203_161 WHERE "qual.\npos." < 5
squall
CREATE TABLE table_name_69 ( name VARCHAR, lane VARCHAR, nationality VARCHAR )
What is the name for lane 1, from Mauritius?
SELECT name FROM table_name_69 WHERE lane = 1 AND nationality = "mauritius"
sql_create_context
CREATE TABLE table_77973 ( "Episode" text, "Air Date" text, "Timeslot" text, "Viewers" text, "Weekly Rank for Living" text )
what is the episode with the 183,000 viewers?
SELECT "Episode" FROM table_77973 WHERE "Viewers" = '183,000'
wikisql
CREATE TABLE table_1646 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Name the score for game 66
SELECT "Score" FROM table_1646 WHERE "Game" = '66'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
Bring me the number of patients with abdominal pain as their primary disease who died in or before 2186.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ABDOMINAL PAIN" AND demographic.dod_year <= "2186.0"
mimicsql_data
CREATE TABLE climber ( climber_id number, name text, country text, time text, points number, mountain_id number ) CREATE TABLE mountain ( mountain_id number, name text, height number, prominence number, range text, country text )
List the names of mountains that do not have any climber.
SELECT name FROM mountain WHERE NOT mountain_id IN (SELECT mountain_id FROM climber)
spider
CREATE TABLE table_8861 ( "Wrestler" text, "Reign" real, "Date" text, "Days held" text, "Location" text, "Event" text, "Successful defenses" real )
What is chris jones' location?
SELECT "Location" FROM table_8861 WHERE "Wrestler" = 'chris jones'
wikisql
CREATE TABLE table_25762852_1 ( name VARCHAR, runs VARCHAR )
How many resorts have 118 runs?
SELECT COUNT(name) FROM table_25762852_1 WHERE runs = "118"
sql_create_context
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, chartt...
count how many times until 2104 patient 73595 has had a exc/dest intvrt disc nos.
SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'exc/dest intvrt disc nos') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73595) AND STRFTIME('%y', ...
mimic_iii
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
count the number of patients whose primary disease is chest pain and age is less than 54?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CHEST PAIN" AND demographic.age < "54"
mimicsql_data
CREATE TABLE table_10687 ( "Code" real, "Type" text, "Name" text, "Area (km 2 )" real, "Population" real, "Regional County Municipality" text, "Region" real )
How many people are in regions greater than 3?
SELECT SUM("Population") FROM table_10687 WHERE "Region" > '3'
wikisql
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, ...
how many of the patients had a lab test for bands?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Bands"
mimicsql_data
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requi...
Name the teacher who teach 480 other than Prof. Pablo Bravo .
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 480 AND NOT instructor.name LIKE '%Pablo Bravo%' AND offering_instructor.instructor_id = instructor.instructor_id AND offeri...
advising
CREATE TABLE table_24948 ( "Rank" real, "Athlete" text, "Nation" text, "Olympics" text, "Gold" real, "Silver" real, "Bronze" real, "Total(min. 2 medals)" real )
Name the silver for ronald weigel category:articles with hcards
SELECT MAX("Silver") FROM table_24948 WHERE "Athlete" = 'Ronald Weigel Category:Articles with hCards'
wikisql
CREATE TABLE table_15290638_1 ( group_a VARCHAR, group_d VARCHAR )
Who is in group a when indiana is in group d?
SELECT group_a FROM table_15290638_1 WHERE group_d = "Indiana"
sql_create_context
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Sc...
How Many Top 1000 Users according to Answer Amount in the Real Top 1000.
WITH TT AS (SELECT Users.Id AS Id, Users.Reputation AS UserReputation, COUNT(Posts.Id) AS Answers, CAST(AVG(CAST(Score AS FLOAT)) AS FLOAT(6, 2)) AS "average_answer_score" FROM Posts INNER JOIN Users ON Users.Id = OwnerUserId WHERE PostTypeId = 2 AND CommunityOwnedDate IS NULL AND ClosedDate IS NULL GROUP BY Users.Id, ...
sede
CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, win...
Find times of trains that run through stations for the local authority Chiltern, compare the total number of different times, and I want to order in asc by the Y-axis.
SELECT time, COUNT(time) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY time ORDER BY COUNT(time)
nvbench
CREATE TABLE table_29441 ( "Episode" text, "Date" text, "Official ITV rating (millions)" text, "Weekly rank" real, "Share (%)" text, "Official ITV HD rating (millions)" text, "Total ITV viewers (millions)" text )
What episode had a share percentage of 41.5%?
SELECT "Episode" FROM table_29441 WHERE "Share (%)" = '41.5'
wikisql
CREATE TABLE table_320 ( "Country" text, "Interview" text, "Swimsuit" text, "Evening Gown" text, "Average" text )
Who had an evening gown score of 9.78?
SELECT "Interview" FROM table_320 WHERE "Evening Gown" = '9.78'
wikisql
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, ...
What will Prof. Jordan Watkins be teaching in the Spring-Summer of 2016 ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Jordan Watkins%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.of...
advising
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 code , and group by attribute founder in a bar chart, show by the bar from high to low.
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name DESC
nvbench
CREATE TABLE table_60867 ( "South West DFL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
How many Losses have South West DFL of coleraine, and an Against smaller than 891?
SELECT COUNT("Losses") FROM table_60867 WHERE "South West DFL" = 'coleraine' AND "Against" < '891'
wikisql
CREATE TABLE table_65029 ( "Party" text, "Burnley" real, "Chorley" real, "Fylde" real, "Hyndburn" real, "Lancaster" real, "Pendle" real, "Preston" real, "Ribble Valley" real, "Rossendale" real, "South Ribble" real, "West Lancashire" real, "Wyre" real, "Total" real...
What is the lowest Chorley with a 6 Preston and a 4 for West Lancashire?
SELECT MIN("Chorley") FROM table_65029 WHERE "Preston" = '6' AND "West Lancashire" < '4'
wikisql
CREATE TABLE table_60322 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
What is the goal difference for entries with more than 6 draws, a position lower than 12, and fewer than 9 wins?
SELECT "Goal Difference" FROM table_60322 WHERE "Draws" > '6' AND "Position" > '12' AND "Wins" < '9'
wikisql
CREATE TABLE table_25272 ( "Year" real, "Class" text, "Team name" text, "Bike" text, "Riders" text, "Races" text, "Wins" real, "Podiums" real, "Poles" real, "F.laps" real, "Points" real, "Pos." text )
When 1 (5) is the races what is the team name?
SELECT "Team name" FROM table_25272 WHERE "Races" = '1 (5)'
wikisql
CREATE TABLE table_4483 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
How much did the away team score at Victoria park?
SELECT "Away team score" FROM table_4483 WHERE "Venue" = 'victoria park'
wikisql
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text )...
what is the cheapest round trip fare on CO 1291 round trip DENVER SAN FRANCISCO
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.cit...
atis
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
give me the number of patients whose admission type is newborn and days of hospital stay is greater than 9?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.days_stay > "9"
mimicsql_data
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...
在医院9057855中就诊科室名称包含男科的所有门诊中,患者64012281的就诊记录的流水号是哪些
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 = '64012281' AND hz_info.YLJGDM = '9057855' AND wdmzjzjlb.JZKSMC LIKE '%男科%' UNION SELECT bdmzjzjlb.JZLSH FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM...
css
CREATE TABLE table_203_105 ( id number, "name" text, "street address" text, "years as tallest" text, "height\nft (m)" text, "floors" number )
how tall is it to the top of the ids tower in feet ?
SELECT "height\nft (m)" FROM table_203_105 WHERE "name" = 'ids tower'
squall
CREATE TABLE table_name_80 ( qual_1 VARCHAR, qual_2 VARCHAR )
What is Qual 1, when Qual 2 is 1:27.537?
SELECT qual_1 FROM table_name_80 WHERE qual_2 = "1:27.537"
sql_create_context
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...
是哪几家医院给45863758号售卖的药品428783571?
SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_ID = '45863758' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_CD = '428783571') UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '45863758' AND fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22....
css
CREATE TABLE MediaType ( MediaTypeId integer, Name varchar(120) ) CREATE TABLE Album ( AlbumId integer, Title varchar(160), ArtistId integer ) CREATE TABLE PlaylistTrack ( PlaylistId integer, TrackId integer ) CREATE TABLE InvoiceLine ( InvoiceLineId integer, InvoiceId integer, ...
What are the first names and support rep ids for employees serving 10 or more customers, and rank SupportRepId from low to high order.
SELECT T1.FirstName, T1.SupportRepId FROM Customer AS T1 JOIN Employee AS T2 ON T1.SupportRepId = T2.EmployeeId ORDER BY T1.SupportRepId
nvbench
CREATE TABLE table_name_20 ( displacement VARCHAR, model VARCHAR, fuel_system VARCHAR, power VARCHAR )
What is the displacement when the fuel system is carburettor, and a power of ps (kw; hp), and also has a model of 2000?
SELECT displacement FROM table_name_20 WHERE fuel_system = "carburettor" AND power = "ps (kw; hp)" AND model = "2000"
sql_create_context
CREATE TABLE table_1013129_1 ( position VARCHAR, college_junior_club_team VARCHAR )
What positions does the college/junior/club team, molot perm (russia) have?
SELECT position FROM table_1013129_1 WHERE college_junior_club_team = "Molot Perm (Russia)"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
what is the number of patients whose item id is 50802?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "50802"
mimicsql_data
CREATE TABLE table_name_25 ( winner VARCHAR, finalist VARCHAR, tournament VARCHAR )
Who was the winner of the Miami tournament where Elena Dementieva was a finalist?
SELECT winner FROM table_name_25 WHERE finalist = "elena dementieva" AND tournament = "miami"
sql_create_context
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABL...
what was the number of patients who had a eye microbiology test in this year?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'eye' AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'))
mimic_iii
CREATE TABLE table_43499 ( "Official Name" text, "Status" text, "Area km 2" real, "Population" real, "Census Ranking" text )
Which status is 75.35 km2 and is named sussex?
SELECT "Status" FROM table_43499 WHERE "Area km 2" < '75.35' AND "Official Name" = 'sussex'
wikisql
CREATE TABLE table_204_757 ( id number, "state" text, "interview" number, "swimsuit" number, "evening gown" number, "average" number )
which state has the top swimsuit amount ?
SELECT "state" FROM table_204_757 ORDER BY "swimsuit" DESC LIMIT 1
squall
CREATE TABLE table_32286 ( "Year" real, "BB Pop" text, "BB CW" text, "BB RB" text, "BB EL" text, "CB CW" text, "RIAA" text )
What is the BB Pop for the song with RIAA of G that was in a year earlier than 1961?
SELECT "BB Pop" FROM table_32286 WHERE "RIAA" = 'g' AND "Year" < '1961'
wikisql
CREATE TABLE table_name_51 ( surface VARCHAR, opponent_in_the_final VARCHAR )
Which surface has wynne prakusya as the opponent in the final?
SELECT surface FROM table_name_51 WHERE opponent_in_the_final = "wynne prakusya"
sql_create_context
CREATE TABLE table_name_13 ( seat VARCHAR, series_4 VARCHAR )
What is the total number of seats with gavin duffy in series 4?
SELECT COUNT(seat) FROM table_name_13 WHERE series_4 = "gavin duffy"
sql_create_context
CREATE TABLE table_13710464_1 ( score VARCHAR, date VARCHAR )
How many games played on june 25?
SELECT COUNT(score) FROM table_13710464_1 WHERE date = "June 25"
sql_create_context
CREATE TABLE table_name_80 ( bronze INTEGER, gold VARCHAR, silver VARCHAR, rank VARCHAR )
What average bronze has 0 as the silver, 17 as the rank, and a gold less than 1?
SELECT AVG(bronze) FROM table_name_80 WHERE silver = 0 AND rank = "17" AND gold < 1
sql_create_context
CREATE TABLE table_name_3 ( top_25 INTEGER, top_5 INTEGER )
Which Top-25 has a Top-5 smaller than 0?
SELECT SUM(top_25) FROM table_name_3 WHERE top_5 < 0
sql_create_context
CREATE TABLE table_9853 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text )
On June 26, 2006 the game was played on what surface?
SELECT "Surface" FROM table_9853 WHERE "Date" = 'june 26, 2006'
wikisql
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
For the attribute ACC_Regular_Season and School_ID, show their proportion by a pie chart.
SELECT ACC_Regular_Season, School_ID FROM basketball_match
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...
give me the number of patients with lab test item id 50893 who were admitted before the year 2139.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2139" AND lab.itemid = "50893"
mimicsql_data
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, Sug...
Users with highest accept rate of their answers. Does not count self-answers. Shows users with at least @MinAnswers answers.
SELECT u.Id AS "user_link", COUNT(*) AS NumAnswers, SUM(CASE WHEN q.AcceptedAnswerId = a.Id THEN 1 ELSE 0 END) AS NumAccepted, (SUM(CASE WHEN q.AcceptedAnswerId = a.Id THEN 1 ELSE 0 END) * 100.0 / COUNT(*)) AS AcceptedPercent FROM Posts AS a INNER JOIN Users AS u ON u.Id = a.OwnerUserId INNER JOIN Posts AS q ON a.Paren...
sede
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
For the EECS major , what are the PreMajor courses ?
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%EECS%' AND program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id
advising
CREATE TABLE table_54183 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What venue features an away team score of 4.9 (33)?
SELECT "Venue" FROM table_54183 WHERE "Away team score" = '4.9 (33)'
wikisql
CREATE TABLE table_name_85 ( iata VARCHAR, city VARCHAR )
What is the IATA for Nanjing?
SELECT iata FROM table_name_85 WHERE city = "nanjing"
sql_create_context
CREATE TABLE table_16907 ( "Model number" text, "sSpec number" text, "Frequency" text, "L2 cache" text, "FSB" text, "Mult." text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" text )
What is the FSB of the model with part number lf80537gf0411m?
SELECT "FSB" FROM table_16907 WHERE "Part number(s)" = 'LF80537GF0411M'
wikisql
CREATE TABLE table_22009 ( "Name" text, "Volume" text, "Engine" text, "Fuel" text, "Output" text, "Torque" text, "Engine ID code(s)" text, "0\u2013100km/h,s" text, "Top speed" text, "CO 2" text, "Years" text )
Name the 0-100 km/hs for name of 2.0 8v
SELECT "0\u2013100km/h,s" FROM table_22009 WHERE "Name" = '2.0 8v'
wikisql
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
在2016年3月8日到2016年7月24日内在科室55664因为糖尿病而住院的费用平均为多少?
SELECT AVG(MED_AMOUT) FROM t_kc21 WHERE MED_ORG_DEPT_CD = '55664' AND IN_HOSP_DATE BETWEEN '2016-03-08' AND '2016-07-24' AND IN_DIAG_DIS_NM = '糖尿病' AND CLINIC_TYPE = '住院'
css
CREATE TABLE table_41982 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
What is the total of NA for set 4, a score of 3-0 and a 26-24 for set 2?
SELECT "Total" FROM table_41982 WHERE "Set 4" = 'na' AND "Score" = '3-0' AND "Set 2" = '26-24'
wikisql
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, a...
what is the least expensive flight from ATLANTA to DENVER leaving on 10 12
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, da...
atis
CREATE TABLE table_1199 ( "Series Ep." text, "Episode" real, "Netflix" text, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text )
Name the segment c for paint rollers
SELECT "Segment C" FROM table_1199 WHERE "Segment B" = 'Paint Rollers'
wikisql
CREATE TABLE table_2140071_13 ( episode VARCHAR )
What is the episode summary for episode 5?
SELECT episode AS Summary FROM table_2140071_13 WHERE episode = 5
sql_create_context
CREATE TABLE table_35800 ( "Date" text, "Tournament" text, "Location" text, "Winner" text, "Score" text, "1st prize ( $ )" real )
What tournament located is mississippi was nov 5
SELECT "Tournament" FROM table_35800 WHERE "Date" = 'nov 5' AND "Location" = 'mississippi'
wikisql
CREATE TABLE table_40383 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text )
On what surface was the match played with a score of 2 6, 6 3, 6 4?
SELECT "Surface" FROM table_40383 WHERE "Score" = '2–6, 6–3, 6–4'
wikisql
CREATE TABLE table_58782 ( "Name" text, "Bodyweight" real, "Snatch" text, "Clean & Jerk" text, "Total (kg)" text )
Who has a Snatch of 157.0?
SELECT "Name" FROM table_58782 WHERE "Snatch" = '157.0'
wikisql
CREATE TABLE table_10812938_4 ( cfl_team VARCHAR, position VARCHAR )
Which CFL Teams drafted an OL in 2006?
SELECT cfl_team FROM table_10812938_4 WHERE position = "OL"
sql_create_context
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
what were the top five common drugs prescribed to patients within the same month after they were prescribed with hydromorphone until 1 year ago?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'hydromorphone' AND DATETIME(prescriptions.startdate) <= DATETIME(...
mimic_iii
CREATE TABLE table_204_395 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
where was the next venue after athens , greece ?
SELECT "venue" FROM table_204_395 WHERE id = (SELECT id FROM table_204_395 WHERE "venue" = 'athens, greece') + 1
squall
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewRejectionReasons ( Id number, Na...
Downvoted questions by day without other markers.
SELECT Posts.Id, Score, VoteTypeId, COUNT(VoteTypeId), OwnerUserId, Title FROM Posts INNER JOIN Votes ON Posts.Id = Votes.PostId WHERE Posts.CreationDate BETWEEN '2012-06-24' AND '2012-06-30' AND PostTypeId = 1 GROUP BY Posts.Id, Title, OwnerUserId, OwnerDisplayName, Score, VoteTypeId HAVING VoteTypeId = 3 ORDER BY Pos...
sede
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...
what is drug route of drug name nephrocaps?
SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Nephrocaps"
mimicsql_data
CREATE TABLE table_56238 ( "Race" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Race Winner" text, "Constructor" text, "Report" text )
What is the report for 10 october?
SELECT "Report" FROM table_56238 WHERE "Date" = '10 october'
wikisql
CREATE TABLE table_76558 ( "Sambalpuri Cinema" text, "Kosal" text, "Western Odisha" text, "Sitalsasthi Carnival" text, "Sambalpuri Language" text, "Sambalpuri Saree" text )
What is the sambalpuri saree with a samaleswari temple as sambalpuri language?
SELECT "Sambalpuri Saree" FROM table_76558 WHERE "Sambalpuri Language" = 'samaleswari temple'
wikisql
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId nu...
Top 20 users in Pune.
SELECT ROW_NUMBER() OVER (ORDER BY Users.Reputation DESC) AS "#", Users.Id AS "user_link", Users.Age, Users.Location, Users.Reputation, Users.Views, Users.UpVotes, Users.DownVotes, (SELECT COUNT(*) FROM Posts AS PQ WHERE PostTypeId = 1 AND PQ.OwnerUserId = Users.Id) AS "questions", (SELECT COUNT(*) FROM Posts AS PA WHE...
sede
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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...
编号为09476292的这位患者被门诊诊断为疾病S98.901,查一下他游离甲状腺素(三代)的结果定量及其单位
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 = jyjgzbb.YLJGDM AND jyb...
css
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 ) ...
among those who had a labt test for cerebrospinal fluid (csf), calculate the total number of widowed patients
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_name_93 ( outcomes VARCHAR, rocket_launch VARCHAR )
What Outcome has a Rocket launch of rehnuma-11?
SELECT outcomes FROM table_name_93 WHERE rocket_launch = "rehnuma-11"
sql_create_context
CREATE TABLE table_76403 ( "Year" text, "2009" text, "2008" text, "2007" text, "2006" text, "2005" text, "2004" text, "2003" text )
What year is the 2007 big red?
SELECT "Year" FROM table_76403 WHERE "2007" = 'big red'
wikisql
CREATE TABLE table_203_576 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
which country got at least one of each medal ?
SELECT "nation" FROM table_203_576 WHERE "gold" >= 1 AND "silver" >= 1 AND "bronze" >= 1
squall
CREATE TABLE table_36665 ( "Couple" text, "Score" text, "Style" text, "Music" text, "Result" text )
What music did Mario & Karina perform?
SELECT "Music" FROM table_36665 WHERE "Couple" = 'mario & karina'
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 procedures ( ...
What is the maximum age of Black/African American patients whose marital status is single?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "BLACK/AFRICAN AMERICAN"
mimicsql_data
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
what are the number of patients who received cont inv mec ven <96 hrs during the same hospital encounter after having received insert endotracheal tube since 2104?
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_...
mimic_iii
CREATE TABLE table_203_531 ( id number, "date" text, "tournament" text, "location" text, "winner" text, "score" text, "1st prize ($)" number )
which state hosted the most pga tour tournaments ?
SELECT "location" FROM table_203_531 GROUP BY "location" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE table_53974 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text )
What Player comes from the Hometown of Wichita, KS?
SELECT "Player" FROM table_53974 WHERE "Hometown" = 'wichita, ks'
wikisql
CREATE TABLE table_15279 ( "Japanese Title" text, "Developer" text, "Publisher" text, "Genre" text, "Console(s)" text, "Initial Release Date" text )
What genre is the Banpresto game tittled Ranma : netsuretsu kakutouhen?
SELECT "Genre" FROM table_15279 WHERE "Developer" = 'banpresto' AND "Japanese Title" = 'ranma ½: netsuretsu kakutouhen'
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, ...
看看编号92525342038的检验报告单检验项目代码及名称分别是什么
SELECT zyjybgb.JYXMDM, zyjybgb.JYXMMC FROM zyjybgb WHERE zyjybgb.BGDH = '92525342038' UNION SELECT mzjybgb.JYXMDM, mzjybgb.JYXMMC FROM mzjybgb WHERE mzjybgb.BGDH = '92525342038'
css
CREATE TABLE table_70524 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
Name the qual for 1957
SELECT "Qual" FROM table_70524 WHERE "Year" = '1957'
wikisql
CREATE TABLE table_name_10 ( record VARCHAR, decision VARCHAR, date VARCHAR )
What is the record for November 4, with a decision made by Denis?
SELECT record FROM table_name_10 WHERE decision = "denis" AND date = "november 4"
sql_create_context
CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) 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_da...
i need information from DENVER to PITTSBURGH
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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBU...
atis
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(...
For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by weekday, and order by the y-axis in descending.
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(DEPARTMENT_ID) DESC
nvbench
CREATE TABLE table_2251578_4 ( province VARCHAR, district VARCHAR )
Which province is in the district of San Antonio de Chuca?
SELECT province FROM table_2251578_4 WHERE district = "San Antonio de Chuca"
sql_create_context
CREATE TABLE table_72568 ( "Rank" real, "Country" text, "Overall" text, "Justice" text, "Health" text, "Education" text, "Economics" text, "Politics" text )
what's the rank for iceland
SELECT "Rank" FROM table_72568 WHERE "Country" = 'Iceland'
wikisql
CREATE TABLE table_1939235_1 ( division INTEGER, regular_season VARCHAR )
When 5th is the regular season what is the highest season?
SELECT MAX(division) FROM table_1939235_1 WHERE regular_season = "5th"
sql_create_context
CREATE TABLE table_name_53 ( home_captain VARCHAR, venue VARCHAR )
Which Home captain has a Venue of melbourne cricket ground?
SELECT home_captain FROM table_name_53 WHERE venue = "melbourne cricket ground"
sql_create_context
CREATE TABLE table_name_83 ( team VARCHAR, laps VARCHAR, co_drivers VARCHAR )
Name the team with laps less than 315 and co-drivers of david brabham franck lagorce?
SELECT team FROM table_name_83 WHERE laps < 315 AND co_drivers = "david brabham franck lagorce"
sql_create_context
CREATE TABLE Assessment_Notes ( date_of_notes VARCHAR )
What are the dates of the assessment notes?
SELECT date_of_notes FROM Assessment_Notes
sql_create_context
CREATE TABLE table_name_25 ( college_junior_club_team__league_ VARCHAR, round VARCHAR, nationality VARCHAR )
What is the name of the team with round less than 2, and the nationality is the United States?
SELECT college_junior_club_team__league_ FROM table_name_25 WHERE round < 2 AND nationality = "united states"
sql_create_context
CREATE TABLE table_8023 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Who was the home team when swansea city was the away team?
SELECT "Home team" FROM table_8023 WHERE "Away team" = 'swansea city'
wikisql
CREATE TABLE table_name_14 ( record VARCHAR, leading_scorer VARCHAR )
What is the record of the game with Rudy Gay (20) as the leading scorer?
SELECT record FROM table_name_14 WHERE leading_scorer = "rudy gay (20)"
sql_create_context