context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_24 ( player VARCHAR, country VARCHAR )
Which player is from scotland?
SELECT player FROM table_name_24 WHERE country = "scotland"
sql_create_context
CREATE TABLE Products ( product_id INTEGER, parent_product_id INTEGER, product_category_code VARCHAR(20), date_product_first_available DATETIME, date_product_discontinued DATETIME, product_name VARCHAR(80), product_description VARCHAR(255), product_price DECIMAL(19,4) ) CREATE TABLE Com...
Return the average price of products that have each category code, and order by the mean product price in asc.
SELECT product_category_code, AVG(product_price) FROM Products GROUP BY product_category_code ORDER BY AVG(product_price)
nvbench
CREATE TABLE table_54974 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
On what date did Fitzroy have a home team score of 8.13 (61)?
SELECT "Date" FROM table_54974 WHERE "Home team score" = '8.13 (61)'
wikisql
CREATE TABLE table_name_75 ( year INTEGER, points VARCHAR )
what is the least year for 4 points?
SELECT MIN(year) FROM table_name_75 WHERE points = 4
sql_create_context
CREATE TABLE table_27877656_8 ( edition VARCHAR, opponent_team VARCHAR )
In what edition was the opponent team Zimbabwe?
SELECT edition FROM table_27877656_8 WHERE opponent_team = "Zimbabwe"
sql_create_context
CREATE TABLE table_37139 ( "Year [A ]" real, "Pick" text, "Player name" text, "Position" text, "College" text )
Which players were selected after 2011?
SELECT "Player name" FROM table_37139 WHERE "Year [A ]" > '2011'
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 (...
count the number of patients whose year of birth is less than 2104 and drug type is main?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2104" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number...
what was the first intake of patient 29741 for the patient until 04/26/2105?
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 29741)) AND STRFTIME('%y-%m-%d', inp...
mimic_iii
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CRE...
what is patient 015-91239's average heartrate, on the current intensive care unit visit?
SELECT AVG(vitalperiodic.heartrate) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-91239') AND patient.unitdischargetime IS NULL) A...
eicu
CREATE TABLE table_name_22 ( series_ep VARCHAR, segment_d VARCHAR )
What is the series episode number with a segment of D, and having fluorescent tubes?
SELECT series_ep FROM table_name_22 WHERE segment_d = "fluorescent tubes"
sql_create_context
CREATE TABLE table_9730 ( "Tournament" text, "Surface" text, "Week" text, "Winner" text, "Finalist" text, "Semi finalists" text )
Which Tournament has a Semi finalists of mary pierce elena dementieva?
SELECT "Tournament" FROM table_9730 WHERE "Semi finalists" = 'mary pierce elena dementieva'
wikisql
CREATE TABLE table_29852 ( "English" text, "Predecessor" text, "Ekavian" text, "Ikavian" text, "Ijekavian" text, "Ijekavian development" text )
What's the predecessor of the Ekavian word vreme?
SELECT "Predecessor" FROM table_29852 WHERE "Ekavian" = 'vreme'
wikisql
CREATE TABLE Department_Stores ( dept_store_id INTEGER, dept_store_chain_id INTEGER, store_name VARCHAR(80), store_address VARCHAR(255), store_phone VARCHAR(80), store_email VARCHAR(80) ) CREATE TABLE Addresses ( address_id INTEGER, address_details VARCHAR(255) ) CREATE TABLE Order_Ite...
Give the maximum product price for each product type in a bar chart, and show X-axis in asc order.
SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code
nvbench
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 ( ...
what is diagnoses short title and diagnoses long title of diagnoses icd9 code 42823?
SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "42823"
mimicsql_data
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 year of birth is less than 2152 and procedure short title is left heart cardiac cath?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2152" AND procedures.short_title = "Left heart cardiac cath"
mimicsql_data
CREATE TABLE browser ( id int, name text, market_share real ) CREATE TABLE Web_client_accelerator ( id int, name text, Operating_system text, Client text, Connection text ) CREATE TABLE accelerator_compatible_browser ( accelerator_id int, browser_id int, compatible_since_ye...
Find the number of web accelerators used for each Operating system, I want to display in ascending by the X.
SELECT Operating_system, COUNT(*) FROM Web_client_accelerator GROUP BY Operating_system ORDER BY Operating_system
nvbench
CREATE TABLE table_name_29 ( total_votes VARCHAR, election VARCHAR, share_of_votes VARCHAR )
What is the vote total for elections after 2001 with 44.5% participation?
SELECT total_votes FROM table_name_29 WHERE election > 2001 AND share_of_votes = "44.5%"
sql_create_context
CREATE TABLE dorm ( dormid number, dorm_name text, student_capacity number, gender text ) CREATE TABLE has_amenity ( dormid number, amenid number ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, c...
Find the name of dorms that can accommodate more than 300 students.
SELECT dorm_name FROM dorm WHERE student_capacity > 300
spider
CREATE TABLE table_38863 ( "Year" text, "Theme" text, "Host city" text, "Venue" text, "Hosts" text )
Who are the hosts for the 2004 event?
SELECT "Hosts" FROM table_38863 WHERE "Year" = '2004'
wikisql
CREATE TABLE courses ( course_id text, course_name text, course_description text, other_details text ) CREATE TABLE candidate_assessments ( candidate_id number, qualification text, assessment_date time, asessment_outcome_code text ) CREATE TABLE student_course_registrations ( stude...
What details do we have on the students who registered for courses most recently?
SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1
spider
CREATE TABLE table_name_54 ( killed INTEGER, perpetrator VARCHAR )
What is the average number of people killed with a Perpetrator of wirjo, 42?
SELECT AVG(killed) FROM table_name_54 WHERE perpetrator = "wirjo, 42"
sql_create_context
CREATE TABLE table_name_47 ( away_team VARCHAR, venue VARCHAR )
What is the away team score of the game that was played at princes park?
SELECT away_team AS score FROM table_name_47 WHERE venue = "princes park"
sql_create_context
CREATE TABLE table_59090 ( "Player" text, "Country" text, "Year(s) Won" text, "Total" real, "To par" real )
Can you tell me the Country that has the Year(s) Won of 1988?
SELECT "Country" FROM table_59090 WHERE "Year(s) Won" = '1988'
wikisql
CREATE TABLE table_10227 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which home team played an away team with the score of 12.15 (87)?
SELECT "Home team" FROM table_10227 WHERE "Away team score" = '12.15 (87)'
wikisql
CREATE TABLE table_name_62 ( week VARCHAR, air_date VARCHAR )
Which Week has an Air Date of august 2, 2008?
SELECT week FROM table_name_62 WHERE air_date = "august 2, 2008"
sql_create_context
CREATE TABLE table_name_30 ( college VARCHAR, player VARCHAR )
What college did hunter henry go to?
SELECT college FROM table_name_30 WHERE player = "hunter henry"
sql_create_context
CREATE TABLE table_7821 ( "Goal" real, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
When was the venue mexico city, mexico with a goal of 8?
SELECT "Date" FROM table_7821 WHERE "Venue" = 'mexico city, mexico' AND "Goal" = '8'
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, ...
在2007-08-06到2021-12-19期间内,患者70148968被开出的所有检验报告单中的标本采集部位需要列出来
SELECT jybgb.BBCJBW FROM hz_info JOIN mzjzjlb JOIN jybgb ON 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 hz_info.RYBH = '70148968' AND jybgb.BGRQ BETWEEN '2007-08-06' AND '2021-12-19' UNI...
css
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayNa...
Top 50000 best score queries with more than one answer and one favorite.
SELECT ViewCount, CreationDate, Title, Body, Tags, Score, CommentCount, AnswerCount, FavoriteCount FROM Posts WHERE FavoriteCount > 10 AND AnswerCount > 1 AND Score > 100 ORDER BY Score DESC LIMIT 50000
sede
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 ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
what is admission location of subject name tracy farmer?
SELECT demographic.admission_location FROM demographic WHERE demographic.name = "Tracy Farmer"
mimicsql_data
CREATE TABLE gsi ( course_offering_id int, student_id int ) 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 requirement (...
Can you tell me the number of upper-level ITALIAN classes that will be offered for 11 credits this Spring ?
SELECT COUNT(DISTINCT course.course_id) FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.credits = 11 AND course.department = 'ITALIAN' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'S...
advising
CREATE TABLE table_24850630_4 ( distance VARCHAR, race VARCHAR )
What is the distance of the Mooresbridge Stakes race?
SELECT distance FROM table_24850630_4 WHERE race = "Mooresbridge Stakes"
sql_create_context
CREATE TABLE table_56252 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which date has a Crowd greater than 28,000, and a Home team of geelong?
SELECT "Date" FROM table_56252 WHERE "Crowd" > '28,000' AND "Home team" = 'geelong'
wikisql
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TA...
the first time in their first hospital encounter patient 004-65662 received a analgesics - bolus parenteral analgesics treatment?
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-65662' AND NOT patient.hospitaldischargetime IS NULL ORDER BY...
eicu
CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machine_series text, value_points real, quality_rank int ) CREATE TABLE repair_assignment ( technician_id int, repair_ID int, Machine_ID int ) CREATE TABLE repair ( repair_ID int, name text, ...
Create a bar chart showing the total number across team, sort from high to low by the y axis.
SELECT Team, COUNT(*) FROM technician GROUP BY Team ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_204_278 ( id number, "name of president" text, "picture" text, "life span" text, "year of presidency" text, "place of conference" text )
where was the last conference held ?
SELECT "place of conference" FROM table_204_278 ORDER BY "year of presidency" DESC LIMIT 1
squall
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationD...
Top StackOverflow users in Jakarta.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE (LOWER(Location) LIKE '%bangladesh%' OR LOWER(Location) LIKE '%bangladesh%') AND Reputation >= 1000 ORDER BY Reputation DESC
sede
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid numb...
was the sao2 value of patient 006-80884 last measured on the current icu visit greater than the value first measured on the current icu visit?
SELECT (SELECT vitalperiodic.sao2 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-80884') AND patient.unitdischargetime IS NULL) AND...
eicu
CREATE TABLE table_name_17 ( home_team VARCHAR, venue VARCHAR )
What was the home team's score at junction oval?
SELECT home_team AS score FROM table_name_17 WHERE venue = "junction oval"
sql_create_context
CREATE TABLE table_2837 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text )
Who has the high assists when April 26 is the date?
SELECT "High assists" FROM table_2837 WHERE "Date" = 'April 26'
wikisql
CREATE TABLE table_24343 ( "Type of Record" text, "Attendance" real, "Date/Year" text, "Stadium" text, "Result/Games" text )
Name the result/games for 54741
SELECT "Result/Games" FROM table_24343 WHERE "Attendance" = '54741'
wikisql
CREATE TABLE table_name_98 ( year__ceremony_ VARCHAR, original_title VARCHAR )
What is the year of the ceremony with the original title ni iji sin?
SELECT year__ceremony_ FROM table_name_98 WHERE original_title = "ničiji sin"
sql_create_context
CREATE TABLE table_name_62 ( pick__number VARCHAR, league_from VARCHAR, player VARCHAR )
What pick was Scott Glennie from the Western hockey league
SELECT pick__number FROM table_name_62 WHERE league_from = "western hockey league" AND player = "scott glennie"
sql_create_context
CREATE TABLE table_35210 ( "Pos." real, "Car #" real, "Driver" text, "Make" text, "Team" text )
Which team has a car # before 99, a Toyota, and is driven by Mike Skinner?
SELECT "Team" FROM table_35210 WHERE "Car #" < '99' AND "Make" = 'toyota' AND "Driver" = 'mike skinner'
wikisql
CREATE TABLE table_name_91 ( to_par INTEGER, player VARCHAR )
What is the lowest to par for Bob Charles?
SELECT MIN(to_par) FROM table_name_91 WHERE player = "bob charles"
sql_create_context
CREATE TABLE table_64113 ( "Date Released" text, "Polling institute" text, "Socialist" text, "Social Democratic" text, "Green-Communist" text, "People's Party" text, "Left Bloc" text, "Lead" text )
What is the people's party with a 30.0% social democratic?
SELECT "People's Party" FROM table_64113 WHERE "Social Democratic" = '30.0%'
wikisql
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE d_items ( row_id number, itemid number, label text,...
until 2104 how many patients were diagnosed with ganglion of joint within 2 months after diagnosis of ami nos, initial?
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'ganglion of joint'...
mimic_iii
CREATE TABLE Services ( Service_Type_Code VARCHAR, Product_Price INTEGER ) CREATE TABLE Ref_Service_Types ( Service_Type_Description VARCHAR, Service_Type_Code VARCHAR )
What are the descriptions of the service types with product price above 100?
SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100
sql_create_context
CREATE TABLE table_71302 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
What was the qualification with more than 585 laps?
SELECT "Qual" FROM table_71302 WHERE "Laps" = '585'
wikisql
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
哪些韩志明患者的检验报告单号对应的检验结果指标均异常和检验报告单号都是那个?
(SELECT jybgb.BGDH 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 = '韩志明' AND NOT...
css
CREATE TABLE table_49581 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text )
What was the score for the opponent against Katerina Maleeva in the final?
SELECT "Score" FROM table_49581 WHERE "Opponent in the final" = 'katerina maleeva'
wikisql
CREATE TABLE table_26176081_29 ( brup INTEGER, long VARCHAR )
What is the lowest brup when long is 94?
SELECT MIN(brup) FROM table_26176081_29 WHERE long = 94
sql_create_context
CREATE TABLE table_14427 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Round" real, "Time" text )
What is the smallest round resulting in a draw with an Opponent of mari kaneko?
SELECT MIN("Round") FROM table_14427 WHERE "Res." = 'draw' AND "Opponent" = 'mari kaneko'
wikisql
CREATE TABLE table_name_33 ( comp INTEGER, comp_percentage VARCHAR, att VARCHAR )
What is the sum of completions that led to completion percentages of 65.4 and attempts under 451?
SELECT SUM(comp) FROM table_name_33 WHERE comp_percentage = 65.4 AND att < 451
sql_create_context
CREATE TABLE gas_station ( Station_ID int, Open_Year int, Location text, Manager_Name text, Vice_Manager_Name text, Representative_Name text ) CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Pr...
List all headquarters and the number of companies in each headquarter, show in descending by the x axis.
SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY Headquarters DESC
nvbench
CREATE TABLE table_name_48 ( label VARCHAR, year VARCHAR, formats VARCHAR, format VARCHAR )
Tell me the label for formats of cd and album and year of 2008
SELECT label FROM table_name_48 WHERE formats = "cd" AND format = "album" AND year = 2008
sql_create_context
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 ta ( campus_job_id int, student_id int, location varchar ) CREATE TAB...
For next Summer , after 11:45 A.M. , what upper level electives will be available ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.start_time > '11:45' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester...
advising
CREATE TABLE Companies ( id int, name text, Headquarters text, Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value_billion text ) CREATE TABLE Office_locations ( building_id int, company_id int, move_in_year int ) CREATE TABLE building...
List the number of companies for each building in a bar chart, order bar from low to high order.
SELECT T2.name, COUNT(T2.name) FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T2.name ORDER BY T2.name
nvbench
CREATE TABLE table_2508633_3 ( player VARCHAR, nfl_team VARCHAR )
Who was drafted by the Baltimore Colts?
SELECT player FROM table_2508633_3 WHERE nfl_team = "Baltimore Colts"
sql_create_context
CREATE TABLE table_32041 ( "Round" text, "Date(s)" text, "Clubs from the previous round" text, "Clubs involved" real, "Fixtures" real )
In the sixth round, what is the sum of fixtures when there were more than 15 clubs involved?
SELECT SUM("Fixtures") FROM table_32041 WHERE "Round" = 'sixth round' AND "Clubs involved" > '15'
wikisql
CREATE TABLE table_1341718_14 ( candidates VARCHAR, incumbent VARCHAR )
who were the candidates when the incumbent was ed derwinski?
SELECT candidates FROM table_1341718_14 WHERE incumbent = "Ed Derwinski"
sql_create_context
CREATE TABLE table_10054296_1 ( chapters INTEGER, classification VARCHAR, headquarters VARCHAR )
What is the number of chapters listed for the fraternity with a headquarters in Austin, Texas?
SELECT MAX(chapters) FROM table_10054296_1 WHERE classification = "Fraternity" AND headquarters = "Austin, Texas"
sql_create_context
CREATE TABLE table_name_76 ( club VARCHAR, founded VARCHAR, league VARCHAR )
Which Club has a Founded smaller than 1882, and a League of fa premier league?
SELECT club FROM table_name_76 WHERE founded < 1882 AND league = "fa premier league"
sql_create_context
CREATE TABLE table_70936 ( "Team" text, "Manager 1" text, "Captain" text, "Kit manufacturer" text, "Shirt sponsor" text )
Who was the manager for the team with captain Neil Redfearn?
SELECT "Manager 1" FROM table_70936 WHERE "Captain" = 'neil redfearn'
wikisql
CREATE TABLE table_name_84 ( opponent VARCHAR, result VARCHAR )
Tell me the opponent that had a result of l 27-20
SELECT opponent FROM table_name_84 WHERE result = "l 27-20"
sql_create_context
CREATE TABLE table_61920 ( "Rank:" real, "Prime Minister:" text, "Party:" text, "Assumed Office:" text, "Left Office:" text, "TOTAL Time in Office:" text )
What is the party of the prime minister who left office on 11 March 1983?
SELECT "Party:" FROM table_61920 WHERE "Left Office:" = '11 march 1983'
wikisql
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org...
tell me what are the top five most common diagnoses of patients with a 40s age during the previous year?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN...
mimic_iii
CREATE TABLE table_54710 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
When south Melbourne was the home team, what was the away team?
SELECT "Away team" FROM table_54710 WHERE "Home team" = 'south melbourne'
wikisql
CREATE TABLE table_66650 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
What was the To par for the player who finished t56?
SELECT "To par" FROM table_66650 WHERE "Finish" = 't56'
wikisql
CREATE TABLE table_name_42 ( entrant VARCHAR, engine VARCHAR, chassis VARCHAR )
Which entrant has a Honda V6 engine and a Lotus 99t chassis?
SELECT entrant FROM table_name_42 WHERE engine = "honda v6" AND chassis = "lotus 99t"
sql_create_context
CREATE TABLE table_name_7 ( away_team VARCHAR )
What was South Melbourne's away team score?
SELECT away_team AS score FROM table_name_7 WHERE away_team = "south melbourne"
sql_create_context
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, ...
项目6599-i在医疗机构0036548的检查记录有多少?
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.MED_SER_ORG_NO = '0036548' AND t_kc22.SOC_SRT_DIRE_CD = '6599-i'
css
CREATE TABLE table_57361 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
Which time/retired had 75 laps and Pedro de la Rosa as a driver?
SELECT "Time/Retired" FROM table_57361 WHERE "Laps" = '75' AND "Driver" = 'pedro de la rosa'
wikisql
CREATE TABLE table_51938 ( "Player" text, "Date of Birth" text, "Batting Style" text, "Bowling Style" text, "First Class Team" text )
Name the bowling style of the player born 16 march 1974
SELECT "Bowling Style" FROM table_51938 WHERE "Date of Birth" = '16 march 1974'
wikisql
CREATE TABLE table_1342393_23 ( first_elected INTEGER, incumbent VARCHAR )
What is the least first elected for jeff busby?
SELECT MIN(first_elected) FROM table_1342393_23 WHERE incumbent = "Jeff Busby"
sql_create_context
CREATE TABLE table_204_246 ( id number, "department" text, "total deputies" number, "uninominal deputies" number, "plurinominal deputies" number, "special indigenous\nor campesino deputies" number, "senators" number )
which country has the most uninominal deputies
SELECT "department" FROM table_204_246 WHERE "uninominal deputies" = (SELECT MAX("uninominal deputies") FROM table_204_246)
squall
CREATE TABLE table_13586 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text, "Notes" text )
In which competition was Moradi's time 1:48.58?
SELECT "Competition" FROM table_13586 WHERE "Notes" = '1:48.58'
wikisql
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
列出患者06699994去医院0306575做入院诊断疾病结果中不包含增生的医疗就诊记录的编码
SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '06699994' AND MED_SER_ORG_NO = '0306575' AND NOT IN_DIAG_DIS_NM LIKE '%增生%'
css
CREATE TABLE table_36049 ( "Episode" text, "Title" text, "Writer(s)" text, "Preservation" text, "Original airdate" text )
Which writer wrote episode 18-09 (652)?
SELECT "Writer(s)" FROM table_36049 WHERE "Episode" = '18-09 (652)'
wikisql
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Badges ( Id number, UserId number, Name t...
Accepted Answers by Group Members based on specified dates.
SELECT Users.DisplayName, answers.Id AS "a.answerid", answers.ParentId AS "a.questionid", answers.CreationDate AS "a.cdate" FROM Posts AS questions LEFT JOIN Posts AS answers ON questions.AcceptedAnswerId = answers.Id LEFT JOIN Users AS users ON answers.OwnerUserId = Users.Id WHERE (answers.OwnerUserId = 5637321 OR ans...
sede
CREATE TABLE table_8092 ( "Date" real, "Region" text, "Label" text, "Format" text, "Catalog" text )
What is the Format of the Label with Catalog SBP 234999?
SELECT "Format" FROM table_8092 WHERE "Catalog" = 'sbp 234999'
wikisql
CREATE TABLE table_31068 ( "Week of" text, "Tournament" text, "Champion" text, "Runner-up" text, "Semifinalists" text, "Quarterfinalists" text )
Which tournament was on the week of 24 october and champion is matt doyle 1 6, 6 1, 6 2?
SELECT "Tournament" FROM table_31068 WHERE "Week of" = '24 October' AND "Champion" = 'Matt Doyle 1–6, 6–1, 6–2'
wikisql
CREATE TABLE table_60105 ( "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text )
Who was the girl of the week 2 weeks before terri lynn farrow in the same month?
SELECT "Week 2" FROM table_60105 WHERE "Week 4" = 'terri lynn farrow'
wikisql
CREATE TABLE table_25773915_11 ( ydl INTEGER )
What is the ydi minimum?
SELECT MIN(ydl) FROM table_25773915_11
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...
how many male patients are discharged to rehab/distinct part hosp?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "REHAB/DISTINCT PART HOSP"
mimicsql_data
CREATE TABLE table_name_65 ( l2_cache VARCHAR, model_number VARCHAR )
What is the L2 cache for the core i7-2635QM?
SELECT l2_cache FROM table_name_65 WHERE model_number = "core i7-2635qm"
sql_create_context
CREATE TABLE table_name_96 ( theme VARCHAR, winner VARCHAR )
What is the theme with dani as the winner?
SELECT theme FROM table_name_96 WHERE winner = "dani"
sql_create_context
CREATE TABLE table_name_3 ( navigator VARCHAR, driver VARCHAR )
What is the navigator for James?
SELECT navigator FROM table_name_3 WHERE driver = "james"
sql_create_context
CREATE TABLE table_20525 ( "Channel" real, "Band" text, "Video Frequency" text, "Audio Frequency" text, "Station" text, "Network" text, "Transmission" text, "Format" text, "Status" text )
What station on the network is tv3?
SELECT "Network" FROM table_20525 WHERE "Station" = 'TV3'
wikisql
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 ...
在77838573351住院就诊中,住院的主要诊断如何?编码类型、编码列表、名称列表分别是啥
SELECT zyjzjlb.ZYBMLX, zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '77838573351'
css
CREATE TABLE table_29552 ( "Season" text, "Points per Game" text, "Total Yards per Game" text, "Rushing Yards per Game" text, "Passing Yards per Game" text, "Sacks" text, "Interceptions" text )
What is every value for points per game if passing yards per game is 179.6?
SELECT "Points per Game" FROM table_29552 WHERE "Passing Yards per Game" = '179.6'
wikisql
CREATE TABLE table_68943 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text )
what year saw georgy trouerbach nicole van hooren win the women's doubles?
SELECT "Year" FROM table_68943 WHERE "Women's doubles" = 'georgy trouerbach nicole van hooren'
wikisql
CREATE TABLE table_62424 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text )
What are the results for Bill Shuster?
SELECT "Results" FROM table_62424 WHERE "Incumbent" = 'bill shuster'
wikisql
CREATE TABLE table_77150 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
What is the lowest round of the position de player with an overall less than 84?
SELECT MIN("Round") FROM table_77150 WHERE "Position" = 'de' AND "Overall" < '84'
wikisql
CREATE TABLE table_69766 ( "Year" real, "Song title" text, "Artist" text, "Master recording?" text, "Release date" text, "Single / Pack" text )
What is the name of the artist with a Single / Pack of guitar hero track pack 1?
SELECT "Artist" FROM table_69766 WHERE "Single / Pack" = 'guitar hero track pack 1'
wikisql
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name tex...
Average Number of Answers if has accepted vs none accepted. Returns the average number of answers from all Q&As with at least 1 answer where the Question has an accepted answer vs questions that don't have accepted answers. The theory is that questions that have accepted answers may discourage more answers being added.
WITH Accepted AS (SELECT xID = 1, AVG(CAST(p.AnswerCount AS FLOAT)) AS AcceptedCount FROM Posts AS p INNER JOIN Posts AS a ON p.Id = a.ParentId INNER JOIN Votes AS v ON a.Id = v.PostId WHERE p.PostTypeId = 1 AND p.AnswerCount > 0 AND v.VoteTypeId = 1 AND NOT p.AcceptedAnswerId IS NULL), NoAccepted AS (SELECT xID = 1, A...
sede
CREATE TABLE table_name_8 ( rank INTEGER, name VARCHAR, points VARCHAR )
Which Rank has a Name of john curry, and Points larger than 338.43?
SELECT MAX(rank) FROM table_name_8 WHERE name = "john curry" AND points > 338.43
sql_create_context
CREATE TABLE table_name_65 ( last_64 VARCHAR, total VARCHAR )
Which Last 64 has a Total of 34,600?
SELECT last_64 FROM table_name_65 WHERE total = "£34,600"
sql_create_context
CREATE TABLE table_1317 ( "Episode" real, "Title" text, "Story" text, "Adapted by" text, "Director" text, "Airdate" text, "Exists?" text )
What is the airdate when the director is george spenton-foster
SELECT "Airdate" FROM table_1317 WHERE "Director" = 'George Spenton-Foster'
wikisql
CREATE TABLE table_10255 ( "Team" text, "Stadium" text, "Capacity" real, "Highest" real, "Lowest" real, "Average" real )
What is the total number for smallest number in attendance at Broadwood Stadium when the largest attendance was 6,192, with an average of 2,468?
SELECT COUNT("Lowest") FROM table_10255 WHERE "Highest" < '6,192' AND "Average" < '2,468' AND "Stadium" = 'broadwood stadium'
wikisql