context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_7722 ( "Basin" text, "Outlet" text, "Total Area" text, "In-State Area" text, "% In-State" text )
What is the in-state area with an outlet of South Platte River and Big Thompson river as the basin?
SELECT "In-State Area" FROM table_7722 WHERE "Outlet" = 'south platte river' AND "Basin" = 'big thompson river'
wikisql
CREATE TABLE Engineer_Visits ( engineer_visit_id INTEGER, contact_staff_id INTEGER, engineer_id INTEGER, fault_log_entry_id INTEGER, fault_status VARCHAR(10), visit_start_datetime DATETIME, visit_end_datetime DATETIME, other_visit_details VARCHAR(255) ) CREATE TABLE Staff ( staff_id...
How many engineers did each staff contact? List both the contact staff name and number of engineers contacted Plot them as bar chart, and I want to rank from low to high by the bar.
SELECT staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name ORDER BY staff_name
nvbench
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate ...
Popular Questions By View Count.
COMMIT
sede
CREATE TABLE table_57331 ( "Council" text, "2003 result" text, "Notional control (based on 2003 results)" text, "2007 result" text, "Details" text )
What council has a 2007 result of no overall control (ind + snp)?
SELECT "Council" FROM table_57331 WHERE "2007 result" = 'no overall control (ind + snp)'
wikisql
CREATE TABLE table_27861 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" text, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text )
How many settlements have as their cyrillic name and other names ?
SELECT "Settlement" FROM table_27861 WHERE "Cyrillic Name Other Names" = 'Панонија'
wikisql
CREATE TABLE table_16686 ( "Country" text, "Total" real, "Marathon (mens)" real, "Marathon (womens)" real, "Half Marathon (mens)" real, "Half Marathon (womens)" real )
Whatis the total number of half marathon (mens) that represented kazakhstan?
SELECT COUNT("Half Marathon (mens)") FROM table_16686 WHERE "Country" = 'Kazakhstan'
wikisql
CREATE TABLE table_693 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Status" text, "Opponent" text )
what's the first elected with opponent being ralph regula (r) 75.0% j. michael finn (d) 25.0%
SELECT "First elected" FROM table_693 WHERE "Opponent" = 'Ralph Regula (R) 75.0% J. Michael Finn (D) 25.0%'
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,...
想知道18633178086这次医疗就诊的大病支付金额
SELECT ILL_PAY FROM t_kc24 WHERE MED_CLINIC_ID = '18633178086'
css
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number...
My \newcommand comments without \begingroup.
SELECT CONCAT('https://math.stackexchange.com/questions/', PostId), Score, Text, CreationDate FROM Comments WHERE UserId = 11994 AND Text LIKE '%\newcommand%' AND NOT Text LIKE '%\begingroup%' COLLATE Latin1_General_100_CI_AI_SC ORDER BY CreationDate DESC
sede
CREATE TABLE technician ( technician_id real, Name text, Team text, Starting_Year real, Age int ) CREATE TABLE repair ( repair_ID int, name text, Launch_Date text, Notes text ) CREATE TABLE repair_assignment ( technician_id int, repair_ID int, Machine_ID int ) CREATE T...
Show names of technicians who are assigned to repair machines with value point more than 70, and count them by a bar chart, could you sort by the y axis in ascending?
SELECT Name, COUNT(Name) FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.Machine_ID = T2.Machine_ID JOIN technician AS T3 ON T1.technician_id = T3.technician_id WHERE T2.value_points > 70 GROUP BY Name ORDER BY COUNT(Name)
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
what is the number of patients whose diagnoses short title is accid in resident instit and lab test category is hematology?
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 = "Accid in resident instit" AND lab."CATEGORY" = "Hematology"
mimicsql_data
CREATE TABLE table_name_89 ( order_year VARCHAR, model VARCHAR, builder VARCHAR, length__ft_ VARCHAR )
What is the order year of obi builder and 05.505 model that is 30 feet long?
SELECT order_year FROM table_name_89 WHERE builder = "obi" AND length__ft_ = "30" AND model = "05.505"
sql_create_context
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, ...
First question tag for future Socrates.
WITH user_questions AS (SELECT OwnerUserId, COUNT(*) AS number_asked, AVG(Score) AS avg_score FROM Posts WHERE PostTypeId = 1 AND Score >= '##score?1##' AND NOT OwnerUserId IS NULL GROUP BY OwnerUserId), asking_badges AS (SELECT OwnerUserId, CASE WHEN number_asked >= '##gold?50##' THEN 1 END AS gold, CASE WHEN number_a...
sede
CREATE TABLE table_77489 ( "Institution" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Nickname" text )
What is Southern Illinois University Edwardsville's affiliation?
SELECT "Affiliation" FROM table_77489 WHERE "Institution" = 'southern illinois university edwardsville'
wikisql
CREATE TABLE table_name_41 ( pada_3 VARCHAR, pada_1 VARCHAR )
Which Pada 3 has a Pada 1 of te?
SELECT pada_3 FROM table_name_41 WHERE pada_1 = "टे te"
sql_create_context
CREATE TABLE table_35510 ( "Dish" text, "Callsign" text, "Network" text, "Resolution" text, "City of License" text, "Official Website" text )
In which city is the network latv licensed?
SELECT "City of License" FROM table_35510 WHERE "Network" = 'latv'
wikisql
CREATE TABLE table_1676073_13 ( club VARCHAR, points_for VARCHAR )
What club has 693 points for?
SELECT club FROM table_1676073_13 WHERE points_for = "693"
sql_create_context
CREATE TABLE table_33066 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text )
Which team is John Williams a rider for?
SELECT "Team" FROM table_33066 WHERE "Rider" = 'john williams'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
what is the number of patients whose ethnicity is white - russian and drug code is mabeli120?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND prescriptions.formulary_drug_cd = "MABELI120"
mimicsql_data
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Rev...
Top 20 [bit] users with synonym voting privileges.
SELECT COUNT(*) AS Posts, SUM(Score) AS Score FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.ParentId INNER JOIN Tags ON PostTags.TagId = Tags.Id INNER JOIN Users ON Posts.OwnerUserId = Users.Id WHERE Posts.CommunityOwnedDate IS NULL AND TagName = 'bit' HAVING SUM(Score) >= 5 ORDER BY SUM(Score) DESC LIMIT 2...
sede
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE class_of_ser...
show me one way flights from MILWAUKEE to ORLANDO after 1800 on wednesday
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 AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE (((DATE_DAY_0.day_number = 23 AND DATE_DAY_0.month...
atis
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, ...
how many of the patients discharged-transferred to psych hosp had t5 fracture as the primary disease?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND demographic.diagnosis = "T5 FRACTURE"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number,...
患者24804917曾在医院就诊从2006年6月9日开始直到2010年8月30日结束次数有多少次?
SELECT (SELECT COUNT(*) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '24804917' AND mzjzjlb.JZKSRQ BETWEEN '2006-06-09' AND '2010-08-30') + (SELECT COUNT(*) FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_...
css
CREATE TABLE table_26250253_1 ( theme VARCHAR, order__number VARCHAR )
How many themes are there where the order # is 9?
SELECT COUNT(theme) FROM table_26250253_1 WHERE order__number = "9"
sql_create_context
CREATE TABLE table_2003 ( "Institution" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Year Joined" real, "Nickname" text, "Conference" text )
Where is the University that is also called Owls?
SELECT "Location" FROM table_2003 WHERE "Nickname" = 'Owls'
wikisql
CREATE TABLE table_13618584_2 ( elected VARCHAR, incumbent VARCHAR )
How many times was incumbent onzlee ware elected?
SELECT COUNT(elected) FROM table_13618584_2 WHERE incumbent = "Onzlee Ware"
sql_create_context
CREATE TABLE table_32622 ( "Stage" text, "Date" text, "Route" text, "Terrain" text, "Length" text, "Winner" text )
Which stage took the tour through Boulogne-Billancourt?
SELECT "Stage" FROM table_32622 WHERE "Route" = 'boulogne-billancourt'
wikisql
CREATE TABLE table_14530 ( "Game" real, "Date" text, "Score" text, "Location" text, "Time" text, "Attendance" real )
What game had the highest score and a time of 2:35?
SELECT MAX("Game") FROM table_14530 WHERE "Time" = '2:35'
wikisql
CREATE TABLE table_name_75 ( net_profit__ INTEGER, earnings_per_share__p_ VARCHAR, profit__loss__before_tax__£m_ VARCHAR )
What is the total net profit when earnings per share is 27.4, and profit/loss befor tax was smaller than 194.6 million?
SELECT SUM(net_profit__) AS £m_ FROM table_name_75 WHERE earnings_per_share__p_ = 27.4 AND profit__loss__before_tax__£m_ < 194.6
sql_create_context
CREATE TABLE table_16614 ( "Rank" real, "Dismissals" real, "Player" text, "Nationality" text, "Catches" real, "Stumpings" real, "Career Span" text )
What is the nationality of David Bairstow?
SELECT "Nationality" FROM table_16614 WHERE "Player" = 'David Bairstow'
wikisql
CREATE TABLE table_name_32 ( rank VARCHAR, director VARCHAR )
What is the rank of the film directed by danny devito?
SELECT rank FROM table_name_32 WHERE director = "danny devito"
sql_create_context
CREATE TABLE table_287159_1 ( other_abbreviation VARCHAR, brightest_star VARCHAR )
What is the other abbreviation of the constellation that has trianguli as its brightest star?
SELECT other_abbreviation FROM table_287159_1 WHERE brightest_star = "β Trianguli"
sql_create_context
CREATE TABLE zzmzjzjlb ( 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...
病人韦嘉泽有多少次医院是在03年3月16日到12年1月12日内去的?
SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '韦嘉泽' AND zzmzjzjlb.JZKSRQ BETWEEN '2003-03-16' AND '2012-01-12' UNION SELECT COUNT(*) FROM p...
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 ) ...
what is minimum age of patients whose gender is f and ethnicity is black/cape verdean?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "BLACK/CAPE VERDEAN"
mimicsql_data
CREATE TABLE table_name_83 ( away_captain VARCHAR, result VARCHAR, date VARCHAR )
Who was the Away captain that played on 12,13,14 Jun 1902 which resulted in a draw?
SELECT away_captain FROM table_name_83 WHERE result = "draw" AND date = "12,13,14 jun 1902"
sql_create_context
CREATE TABLE table_19864214_3 ( wins INTEGER, seasons VARCHAR )
stae the least number of wins in 1986
SELECT MIN(wins) FROM table_19864214_3 WHERE seasons = "1986"
sql_create_context
CREATE TABLE table_37574 ( "Rank" real, "Player" text, "Country" text, "Earnings ( $ )" real, "Wins" real )
What is the lowest rank of a player with earnings under $11,936,443 and more than 16 wins?
SELECT MIN("Rank") FROM table_37574 WHERE "Earnings ( $ )" < '11,936,443' AND "Wins" > '16'
wikisql
CREATE TABLE table_19115414_4 ( mountains_classification VARCHAR, points_classification VARCHAR )
Name the mountains classification for alexander kristoff
SELECT mountains_classification FROM table_19115414_4 WHERE points_classification = "Alexander Kristoff"
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 )
A bar chart for what are the number of the names of all products?, and list by the X-axis in asc.
SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name
nvbench
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), ...
For those employees who did not have any job in the past, find job_id and the sum of salary , and group by attribute job_id, and visualize them by a bar chart, could you rank sum salary in desc order?
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(SALARY) DESC
nvbench
CREATE TABLE table_19755 ( "Result" text, "Date" text, "Race" text, "Venue" text, "Group" text, "Distance" text, "Weight (kg)" text, "Jockey" text, "Winner/2nd" text )
How many jockeys are listed running at the Sir Rupert Clarke Stakes?
SELECT COUNT("Jockey") FROM table_19755 WHERE "Race" = 'Sir Rupert Clarke Stakes'
wikisql
CREATE TABLE table_43779 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
What is City, when IATA is 'LAO'?
SELECT "City" FROM table_43779 WHERE "IATA" = 'lao'
wikisql
CREATE TABLE table_65008 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What is the attendance for a week smaller than 9 with a result of L 38-20?
SELECT MAX("Attendance") FROM table_65008 WHERE "Result" = 'l 38-20' AND "Week" < '9'
wikisql
CREATE TABLE table_4991 ( "Season" real, "Overall" real, "Slalom" text, "Giant Slalom" text, "Super G" text, "Downhill" text, "Combined" text )
Which Slalom has a Downhill of 4?
SELECT "Slalom" FROM table_4991 WHERE "Downhill" = '4'
wikisql
CREATE TABLE table_name_68 ( height_feet___m VARCHAR, floors VARCHAR, name VARCHAR )
What is the height of the Tides with less than 34 floors?
SELECT height_feet___m FROM table_name_68 WHERE floors < 34 AND name = "the tides"
sql_create_context
CREATE TABLE Marketing_Regions ( Marketing_Region_Name VARCHAR, Marketing_Region_Code VARCHAR ) CREATE TABLE Stores ( Marketing_Region_Code VARCHAR, Store_Name VARCHAR )
What is the name of the marketing region that the store Rob Dinning belongs to?
SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = "Rob Dinning"
sql_create_context
CREATE TABLE table_68132 ( "Player" text, "Height" real, "Position" text, "Year born" real, "Current Club" text )
How tall was the member of Nymburk, who was born in 1982?
SELECT MAX("Height") FROM table_68132 WHERE "Year born" = '1982' AND "Current Club" = 'nymburk'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
how many unmarried patients were admitted to hospital before 2177?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.admityear < "2177"
mimicsql_data
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, ...
Who will be teaching Prin Rad Imag this semester ?
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN semester...
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, give me the comparison about the average of code over the name , and group by attribute name by a bar chart, and display in asc by the Y.
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code
nvbench
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description ...
Percentage of good votes (up, accept, fav), accumulative.
SELECT (1.0 * (SELECT COUNT(*) FROM Votes WHERE CreationDate < @cutoff AND (VoteTypeId <= 2 OR VoteTypeId = 5))) / (1.0 * (SELECT COUNT(*) FROM Votes WHERE CreationDate < @cutoff AND (VoteTypeId != 8 AND VoteTypeId != 9))) * 100
sede
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
从2001年6月3日开始2019年7月2日之内新生儿的门诊就诊记录数量在医疗机构2084494中一共有多少?
SELECT COUNT(*) FROM mzjzjlb JOIN hz_info_mzjzjlb JOIN hz_info ON hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.mzjzjlb_id = mzjzjlb.mzjzjlb_id AND hz_info_mzjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '20...
css
CREATE TABLE table_27366 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text )
Name the player for new orleans saints
SELECT "Player" FROM table_27366 WHERE "NFL Team" = 'New Orleans Saints'
wikisql
CREATE TABLE table_204_863 ( id number, "state" text, "city/county" text, "population served" number, "charter type" text, "station name" text, "web site" text )
what is the top population served on the chart
SELECT MAX("population served") FROM table_204_863
squall
CREATE TABLE table_232458_1 ( city___municipality VARCHAR, pop_density__per_km²_ VARCHAR )
What is the name of the city/municipality if the population is 1,388.88?
SELECT city___municipality FROM table_232458_1 WHERE pop_density__per_km²_ = "1,388.88"
sql_create_context
CREATE TABLE table_1965650_9 ( player VARCHAR, college_junior_club_team VARCHAR )
When kitchener rangers (oha) is the college, junior, or club team team who is the player?
SELECT player FROM table_1965650_9 WHERE college_junior_club_team = "Kitchener Rangers (OHA)"
sql_create_context
CREATE TABLE table_8215 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Falcons points" real, "Opponents" real, "Record" text, "Attendance" real )
What is the record of the game that resulted in a loss with more than 56,648 people in attendance?
SELECT "Record" FROM table_8215 WHERE "Result" = 'loss' AND "Attendance" > '56,648'
wikisql
CREATE TABLE table_6007 ( "Release date" text, "Country" text, "Classifaction" text, "Publisher" text, "Format" text, "Region" text, "Language" text, "Sound" text, "Subtitles" text )
What classification has cantonese as the language, and universal pictures japan as the publisher?
SELECT "Classifaction" FROM table_6007 WHERE "Language" = 'cantonese' AND "Publisher" = 'universal pictures japan'
wikisql
CREATE TABLE table_77938 ( "Player" text, "Date of Birth" text, "Batting Style" text, "Bowling Style" text, "First Class Team" text )
Who has a bowling style of source:?
SELECT "Player" FROM table_77938 WHERE "Bowling Style" = 'source:'
wikisql
CREATE TABLE language ( language_id number, name text, last_update time ) CREATE TABLE category ( category_id number, name text, last_update time ) CREATE TABLE city ( city_id number, city text, country_id number, last_update time ) CREATE TABLE customer ( customer_id numb...
Which film has the most number of actors or actresses? List the film name, film id and description.
SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodi...
tell me the sex of patient 006-40255.
SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '006-40255'
eicu
CREATE TABLE table_65830 ( "Internet Explorer" text, "Firefox , Other Mozilla" text, "Chrome" text, "Safari" text, "Opera" text )
What percentage of browsers were using Safari during the period in which 2.05% were using Chrome?
SELECT "Safari" FROM table_65830 WHERE "Chrome" = '2.05%'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
What is the number of patients with inpatient hospital discharge who underwent the laparoscopic lysis of peritoneal adhesions procedure?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" AND procedures.short_title = "Lap periton adhesiolysis"
mimicsql_data
CREATE TABLE table_28853064_15 ( winner VARCHAR, mountains_classification VARCHAR, team_classification VARCHAR )
Who was the winner if the Mountains Classification award was given to Jaime Vergara and the Team Classification award is given to Col es Pasion Caf De Colombia 472?
SELECT winner FROM table_28853064_15 WHERE mountains_classification = "Jaime Vergara" AND team_classification = "Col es Pasion Café De Colombia 472"
sql_create_context
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
在不同科室编码下,列出所有医疗就诊记录在医院9913454的统筹基金支出与医疗费总额的平均比值是多少?
SELECT qtb.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '9913454' GROUP BY qtb.MED_ORG_DEPT_CD UNION SELECT gyb.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.MED_SER_ORG_...
css
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, ...
患者卡号以及卡类型在门诊就诊14556788521中是什么?
SELECT wdmzjzjlb.KH, wdmzjzjlb.KLX FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '14556788521' UNION SELECT bdmzjzjlb.KH, bdmzjzjlb.KLX FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '14556788521'
css
CREATE TABLE table_7340 ( "Date" text, "Time" text, "Home" text, "Away" text, "Score" text, "Ground" text )
What away game had a time of 10:00?
SELECT "Away" FROM table_7340 WHERE "Time" = '10:00'
wikisql
CREATE TABLE gwyjzb ( 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, ...
哪个项目在医疗机构7821897的使用次数排第二?
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '7821897' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 2 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwy...
css
CREATE TABLE table_8001 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What place is Spain in?
SELECT "Place" FROM table_8001 WHERE "Country" = 'spain'
wikisql
CREATE TABLE table_24095 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Wildcats points" real, "Opponents" real, "Record" text )
Who did the team play against when a record of 3-1, #16 was achieved?
SELECT "Opponent" FROM table_24095 WHERE "Record" = '3-1, #16'
wikisql
CREATE TABLE table_68633 ( "Year" text, "Record" text, "Finish" text, "Manager" text, "Playoffs" text )
Name the year for jesus alfaro and finish of 6th
SELECT "Year" FROM table_68633 WHERE "Manager" = 'jesus alfaro' AND "Finish" = '6th'
wikisql
CREATE TABLE table_49132 ( "Event" text, "Date" text, "Round" text, "Name" text, "Nationality" text, "Time" text, "Record" text )
Which event was Ye Shiwen in?
SELECT "Event" FROM table_49132 WHERE "Name" = 'ye shiwen'
wikisql
CREATE TABLE table_train_46 ( "id" int, "bleeding" int, "active_infection" bool, "hypotension" bool, "burn_injury" int, "hypertension" bool, "age" float, "NOUSE" float )
intracranial bleed or intracranial hypertension during the index hospital admission
SELECT * FROM table_train_46 WHERE bleeding = 1 OR hypertension = 1
criteria2sql
CREATE TABLE table_20522 ( "Member State" text, "Population in millions" text, "Population % of EU" text, "Area km 2" real, "Area % of EU" text, "Pop. density People/km 2" text )
Name the number of area km 2 for population density is 87
SELECT COUNT("Area km 2") FROM table_20522 WHERE "Pop. density People/km 2" = '87'
wikisql
CREATE TABLE table_1823 ( "Episodes" text, "Monday" text, "Tuesday" text, "Wednesday" text, "Thursday" text, "Friday" text )
which episode was Transmitted on wednesday if the episode of '438 magic: the gathering mini masters tournament' was transmitted on thursday?
SELECT "Wednesday" FROM table_1823 WHERE "Thursday" = '438 Magic: The Gathering Mini Masters Tournament'
wikisql
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 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, a bar chart shows the distribution of job_id and the average of employee_id , and group by attribute job_id, list by the names from high to low.
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC
nvbench
CREATE TABLE table_204_119 ( id number, "date" text, "time" text, "opponent" text, "site" text, "tv" text, "result" text, "attendance" number, "record" text )
what were the total number of people in attendance on 11/24/2012 ?
SELECT "attendance" FROM table_204_119 WHERE "date" = '11/24/2012'
squall
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, ...
Average Answer Score for a User. Shows the average score for a given user's answers, as well as their total number of answers and the average reputation (simple multiplication by 10) for convenience.
SELECT COUNT(1) AS "number_of_answers", ROUND(AVG(CAST(a.Score AS FLOAT)), 4) AS "average_answer_score", ROUND(AVG(CAST(a.Score AS FLOAT)), 4) * 10 AS "average_answer_reputation" FROM Posts AS a INNER JOIN Posts AS q ON a.ParentId = q.Id WHERE a.OwnerUserId = '##UserId:int##'
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...
count the number of patients who are married and their lab test item id is 51446.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.itemid = "51446"
mimicsql_data
CREATE TABLE table_72186 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff [a ]" text, "Game site" text, "TV" text, "Attendance" text, "Record" text )
Find all the result(s) with the record of 2-13.
SELECT "Result" FROM table_72186 WHERE "Record" = '2-13'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
患者卫夏岚以前出现过哪些异常的反应
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZ...
css
CREATE TABLE table_51089 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What is Away Team, when Home Team is 'Sheffield Wednesday'?
SELECT "Away team" FROM table_51089 WHERE "Home team" = 'sheffield wednesday'
wikisql
CREATE TABLE table_name_5 ( year INTEGER, position INTEGER )
What is the earliest year a song with a position less than 1 has?
SELECT MIN(year) FROM table_name_5 WHERE position < 1
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...
count the number of patients whose days of hospital stay is greater than 30 and lab test name is metamyelocytes?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "30" AND lab.label = "Metamyelocytes"
mimicsql_data
CREATE TABLE table_name_84 ( label VARCHAR, catalog__number VARCHAR )
What is the label for the album with a catalog number of 83061-4?
SELECT label FROM table_name_84 WHERE catalog__number = "83061-4"
sql_create_context
CREATE TABLE table_name_4 ( played INTEGER, position VARCHAR, goals_for VARCHAR )
What is the highest played that has a position less than 17, and 63 as the goals for?
SELECT MAX(played) FROM table_name_4 WHERE position < 17 AND goals_for = 63
sql_create_context
CREATE TABLE table_4481 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the most amount of people in the crowd when the home team scored 13.17 (95)?
SELECT MAX("Crowd") FROM table_4481 WHERE "Home team score" = '13.17 (95)'
wikisql
CREATE TABLE table_name_97 ( long VARCHAR, avg_g VARCHAR )
Which Long has redshirt for its Avg/G?
SELECT long FROM table_name_97 WHERE avg_g = "redshirt"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, H...
那个11103457号的病患在看病过程中被开出的药品都少于9690.79元的医疗就诊编号是多少?
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '11103457' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 9690.79)
css
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 demographic ...
what is minimum age of patients whose gender is f and ethnicity is white?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "WHITE"
mimicsql_data
CREATE TABLE table_818 ( "Stain" text, "Common use" text, "Nucleus" text, "Cytoplasm" text, "Red blood cell (RBC)" text, "Collagen fibers" text, "Specifically stains" text )
What stain is used commonly for elastic fibers?
SELECT "Stain" FROM table_818 WHERE "Common use" = 'Elastic fibers'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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 te...
列出患者24372784入院科室名称包含职业病的在医院8690714中有什么住院就诊记录?
SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '24372784' AND hz_info.YLJGDM = '8690714' AND zyjzjlb.JZKSMC LIKE '%职业病%'
css
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program ( program_id int, name varchar, college varchar...
Before taking course CHEMBIO 501 , which courses do I need to take ?
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
advising
CREATE TABLE table_203_405 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number )
how many points did the eagles score in week 13 ?
SELECT "result" FROM table_203_405 WHERE "week" = 13
squall
CREATE TABLE table_17102076_9 ( high_assists VARCHAR, date VARCHAR )
Who had high assists on March 15?
SELECT high_assists FROM table_17102076_9 WHERE date = "March 15"
sql_create_context
CREATE TABLE table_name_25 ( finish VARCHAR, team VARCHAR, tournament VARCHAR )
During the Tournament of 1st Division El Salvador, what was the Finish for the Team of Platense Municipal Zacatecoluca?
SELECT finish FROM table_name_25 WHERE team = "platense municipal zacatecoluca" AND tournament = "1st division el salvador"
sql_create_context
CREATE TABLE table_name_39 ( director VARCHAR, rank VARCHAR, worldwide_gross VARCHAR )
What director has a worldwide gross of $149,022,650 and is ranked greater than 7?
SELECT director FROM table_name_39 WHERE rank > 7 AND worldwide_gross = "$149,022,650"
sql_create_context
CREATE TABLE table_57015 ( "Year" real, "Author" text, "English title" text, "Original title" text, "Representing" text )
Name the representating for ingenj r andr es luftf rd
SELECT "Representing" FROM table_57015 WHERE "Original title" = 'ingenjör andrées luftfärd'
wikisql
CREATE TABLE table_name_60 ( winner VARCHAR, general_classification VARCHAR, stage VARCHAR )
Who was the winner of Stage 9 when then general classification was Danilo Di Luca?
SELECT winner FROM table_name_60 WHERE general_classification = "danilo di luca" AND stage = "9"
sql_create_context
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 year of birth is less than 2112 and procedure short title is oth periton adhesiolysis?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2112" AND procedures.short_title = "Oth periton adhesiolysis"
mimicsql_data