context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE allergy ( allergy...
had patient 021-25705 had any bulb #2 output in this month?
SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-25705')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu...
eicu
CREATE TABLE table_name_79 ( score VARCHAR, date VARCHAR )
What was the score on 10 November 2006?
SELECT score FROM table_name_79 WHERE date = "10 november 2006"
sql_create_context
CREATE TABLE table_49577 ( "Date" text, "Place" text, "Race winners" text, "GP winner" text, "Source" text )
What is the GP winner with a place of genk, with race winners ben adriaenssen / ben van den bogaart?
SELECT "GP winner" FROM table_49577 WHERE "Place" = 'genk' AND "Race winners" = 'ben adriaenssen / ben van den bogaart'
wikisql
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
Unix and Linux Tag List.
SELECT TagName FROM Tags
sede
CREATE TABLE table_9464 ( "Rank" real, "Airport" text, "Location" text, "IATA" text, "1985\u201386" real, "1990\u201391" real, "1995\u201396" real, "2000\u201301" real, "2005\u201306" real, "2007\u201308" real, "2009\u201310" real, "2010-11" real )
With a 1985-86 of 407 what is the airport?
SELECT "Airport" FROM table_9464 WHERE "1985\u201386" = '407'
wikisql
CREATE TABLE table_204_911 ( id number, "album / name" text, "artist(s)" text, "label" text, "role/credit" text, "date" text, "chart#" text )
who is the next artist after artist enomoto atsuko ?
SELECT "artist(s)" FROM table_204_911 WHERE "date" > (SELECT "date" FROM table_204_911 WHERE "artist(s)" = 'enomoto atsuko') ORDER BY "date" LIMIT 1
squall
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, ...
what is the total cost of a minimum hospital with a drug called levaquin until 2104?
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'levaquin')) AND STRFTIME('%y', cost.chargetime...
eicu
CREATE TABLE fgwyjzb ( 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, ...
彭丽泽这个病患在02年5月5日到11年10月16日之中主要看的病有哪些?
SELECT gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '彭丽泽' AND gwyjzb.IN_HOSP_DATE BETWEEN '2002-05-05' AND '2011-10-16' GROUP BY gwyjzb.IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '彭...
css
CREATE TABLE table_name_31 ( translated_title VARCHAR, norwegian_title VARCHAR )
What is the Translated Title of Steinulven?
SELECT translated_title FROM table_name_31 WHERE norwegian_title = "steinulven"
sql_create_context
CREATE TABLE table_16278673_1 ( municipality VARCHAR, population VARCHAR )
Name the municpality for 57 populaton
SELECT municipality FROM table_16278673_1 WHERE population = "57"
sql_create_context
CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Course_Authors_and_...
Give me the comparison about author_tutor_ATB over the password .
SELECT password, author_tutor_ATB FROM Course_Authors_and_Tutors ORDER BY personal_name
nvbench
CREATE TABLE table_204_869 ( id number, "species" text, "country of origin" text, "total released" number, "first release" text, "last release" text, "areas of release" text, "areas established" text, "pasture type" text )
were more bubas bison or copris hispanus linnaeus released ?
SELECT "species" FROM table_204_869 WHERE "species" IN ('bubas bison', 'copris hispanus linnaeus') ORDER BY "total released" DESC LIMIT 1
squall
CREATE TABLE table_name_35 ( election INTEGER, municipality VARCHAR, inhabitants VARCHAR )
Which Election has a Municipality of laives, and Inhabitants smaller than 17,197?
SELECT AVG(election) FROM table_name_35 WHERE municipality = "laives" AND inhabitants < 17 OFFSET 197
sql_create_context
CREATE TABLE table_7203 ( "Rank" text, "Name" text, "Height m / ft" text, "Floors" real, "Year" real )
What is the number of floors that have years under 2008 and were named Guinness Tower?
SELECT COUNT("Floors") FROM table_7203 WHERE "Year" < '2008' AND "Name" = 'guinness tower'
wikisql
CREATE TABLE table_name_74 ( to_par VARCHAR, money___£__ VARCHAR )
What is the to par for the player with winnings of 49,500?
SELECT to_par FROM table_name_74 WHERE money___£__ = "49,500"
sql_create_context
CREATE TABLE table_name_84 ( cuts_made INTEGER, events INTEGER )
What are the lowest cuts made that have events less than 4?
SELECT MIN(cuts_made) FROM table_name_84 WHERE events < 4
sql_create_context
CREATE TABLE table_19526911_1 ( arena__capacity_ VARCHAR, head_coach VARCHAR )
What is the arena capacity of the arena in the town whose head coach is Roberto Serniotti?
SELECT arena__capacity_ FROM table_19526911_1 WHERE head_coach = "Roberto Serniotti"
sql_create_context
CREATE TABLE music_festival ( ID int, Music_Festival text, Date_of_ceremony text, Category text, Volume int, Result text ) CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE volume ( Volume_ID int, V...
Show me the total number by category in a histogram, show total number from low to high order.
SELECT Category, COUNT(*) FROM music_festival GROUP BY Category ORDER BY COUNT(*)
nvbench
CREATE TABLE table_23249053_8 ( score VARCHAR, game INTEGER )
What is the score when the game is bigger than 29.0?
SELECT score FROM table_23249053_8 WHERE game > 29.0
sql_create_context
CREATE TABLE table_47601 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Who was the home team when Manchester City was the away team?
SELECT "Home team" FROM table_47601 WHERE "Away team" = 'manchester city'
wikisql
CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE EM...
Show me a bar chart for what is the total credit does each department offer?, and show total number in asc order.
SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE ORDER BY SUM(CRS_CREDIT)
nvbench
CREATE TABLE days ( days_code varchar, day_name varchar ) 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, departur...
what is the FIRST class fare on UA flight 352 from DENVER to BOSTON
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, fare_basis, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.flight_number = 352 AND flight.to_airport ...
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...
calculate the number of patients diagnosed with fall nos who have died
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Fall NOS"
mimicsql_data
CREATE TABLE table_60233 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text )
What is the lowest First Elected, when Results is 'Re-elected', and when Incumbent is 'Lincoln Davis'?
SELECT MIN("First elected") FROM table_60233 WHERE "Results" = 're-elected' AND "Incumbent" = 'lincoln davis'
wikisql
CREATE TABLE table_21853 ( "Episode" real, "Original title" text, "Directed by" text, "Written by" text, "Original airdate" text, "Duration" text, "Viewership" text )
What was the first airdate with a viewership of 4.77 million?
SELECT "Original airdate" FROM table_21853 WHERE "Viewership" = '4.77 million'
wikisql
CREATE TABLE bdmzjzjlb ( 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...
20284523病人所有检验结果指标记录的检测员为李雅健的检验指标流水号是多少就在01年7月11日到2014年11月2日之间?
SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.B...
css
CREATE TABLE table_18373863_2 ( player VARCHAR, fcsl_team VARCHAR, years_played VARCHAR )
When 2006 is the year played and winter park is the fcsl team who is the player?
SELECT player FROM table_18373863_2 WHERE fcsl_team = "Winter Park" AND years_played = "2006"
sql_create_context
CREATE TABLE table_62580 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" real )
What player has t3 as the place, with england united states as the country?
SELECT "Player" FROM table_62580 WHERE "Place" = 't3' AND "Country" = 'england united states'
wikisql
CREATE TABLE table_15115 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" text )
Name the result for opponent of chicago bears
SELECT "Result" FROM table_15115 WHERE "Opponent" = 'chicago bears'
wikisql
CREATE TABLE table_48194 ( "Test flight" text, "Date" text, "Speed" text, "Altitude" text, "Crew" text, "Duration" text, "Comment" text )
What it Duration, when Test Flight is Free Flight #3?
SELECT "Duration" FROM table_48194 WHERE "Test flight" = 'free flight #3'
wikisql
CREATE TABLE endowment ( endowment_id int, School_id int, donator_name text, amount real ) CREATE TABLE budget ( School_id int, Year int, Budgeted int, total_budget_percent_budgeted real, Invested int, total_budget_percent_invested real, Budget_invested_percent text ) CREAT...
Show the proportion of the total enrollment in each county with a pie chart.
SELECT County, SUM(Enrollment) FROM School GROUP BY County
nvbench
CREATE TABLE table_37267 ( "Date" text, "City" text, "Opponent" text, "Results\u00b9" text, "Type of game" text )
What day was a friendly game held that had a score of 2:3?
SELECT "Date" FROM table_37267 WHERE "Type of game" = 'friendly' AND "Results\u00b9" = '2:3'
wikisql
CREATE TABLE table_27003223_4 ( democratic VARCHAR, registered_voters VARCHAR )
what is the percentage of democratic voters in which the registered voters is 67.8%?
SELECT democratic FROM table_27003223_4 WHERE registered_voters = "67.8%"
sql_create_context
CREATE TABLE table_34504 ( "Volume" text, "Discs" real, "Episodes" real, "Region 1 release" text, "Region 2 release" text, "Region 4 release" text )
What discs has a region 1 release date of January 22, 2008?
SELECT "Discs" FROM table_34504 WHERE "Region 1 release" = 'january 22, 2008'
wikisql
CREATE TABLE activity ( actid number, activity_name text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABLE...
Find the faculty rank that has the least members.
SELECT rank FROM faculty GROUP BY rank ORDER BY COUNT(*) LIMIT 1
spider
CREATE TABLE party ( party_id number, party_theme text, location text, first_year text, last_year text, number_of_hosts number ) CREATE TABLE host ( host_id number, name text, nationality text, age text ) CREATE TABLE party_host ( party_id number, host_id number, is...
What are the themes and locations of parties?
SELECT party_theme, location FROM party
spider
CREATE TABLE table_55440 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the average amount of spectators when Essendon played as the home team?
SELECT AVG("Crowd") FROM table_55440 WHERE "Home team" = 'essendon'
wikisql
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
列出患者马展鹏被开出的所有检验报告单的检验报告单号有多少在2021-08-09到2021-11-14内?
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '马...
css
CREATE TABLE table_61384 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the rank with a higher than 2 total, 21 gold and more than 12 bronze?
SELECT AVG("Rank") FROM table_61384 WHERE "Total" > '2' AND "Gold" = '21' AND "Bronze" > '12'
wikisql
CREATE TABLE table_60754 ( "Date" text, "Time" text, "Competition" text, "Opponent" text, "Ground" text, "Score" text )
What competition is at 23:00 cet?
SELECT "Competition" FROM table_60754 WHERE "Time" = '23:00 cet'
wikisql
CREATE TABLE table_name_90 ( event VARCHAR, opponent VARCHAR, time VARCHAR )
Which event had the opponent of shinya aoki and was at 4:56?
SELECT event FROM table_name_90 WHERE opponent = "shinya aoki" AND time = "4:56"
sql_create_context
CREATE TABLE table_22067 ( "Position" real, "Club" text, "Games played" real, "Wins" real, "Draws" real, "Loses" real, "Goals scored" real, "Goals conceded" real, "Points" real )
What is the highest number of games played?
SELECT MAX("Games played") FROM table_22067
wikisql
CREATE TABLE Transactions_Lots ( transaction_id INTEGER, lot_id INTEGER ) CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Transactions ( transaction_id INTEGER, investor_id INTEGER, transaction_type_code VARCHAR(10), date_of_transa...
Show all dates of transactions whose type code is 'SALE', and count them by a line chart, and display by the x-axis from high to low.
SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE transaction_type_code = "SALE" ORDER BY date_of_transaction DESC
nvbench
CREATE TABLE table_43466 ( "Index" text, "Name" text, "Song" text, "Group Song" text, "Score" text )
What is Song's Index?
SELECT "Index" FROM table_43466 WHERE "Song" = '会呼吸的痛'
wikisql
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, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( ...
how many people had died after being diagnosed with cocaine abuse-continuous in the same hospital encounter until 2 years ago?
SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime, t1.hadm_id FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FRO...
mimic_iii
CREATE TABLE table_20010140_9 ( record VARCHAR, game VARCHAR )
What was the record after game 20?
SELECT record FROM table_20010140_9 WHERE game = 20
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
give me the number of patients whose discharge location is left against medical advi and year of birth is less than 2041?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" AND demographic.dob_year < "2041"
mimicsql_data
CREATE TABLE table_46124 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What was the score for the game on November 1?
SELECT "Score" FROM table_46124 WHERE "Date" = 'november 1'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
How many patients with government health insurance had an initial insertion of dual-chamber device procedure?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Initial insertion of dual-chamber device"
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 ( ...
what is the average age of patient with single as marital status and admitted under clinic referral/premature?
SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.admission_location = "CLINIC REFERRAL/PREMATURE"
mimicsql_data
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 1 and drug name is aspirin ec?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "1" AND prescriptions.drug = "Aspirin EC"
mimicsql_data
CREATE TABLE table_28326 ( "Episode #" real, "Series #" real, "Title" text, "Director" text, "Writer" text, "Original airdate" text, "Viewers (in millions)" text )
What is the name of the episode that had 8.51 million viewers?
SELECT "Title" FROM table_28326 WHERE "Viewers (in millions)" = '8.51'
wikisql
CREATE TABLE table_name_86 ( method VARCHAR, event VARCHAR, round VARCHAR, res VARCHAR )
Which method had a 3 rounds, result in a loss and the Juiz de Fora - fight 1 event?
SELECT method FROM table_name_86 WHERE round = "3" AND res = "loss" AND event = "juiz de fora - fight 1"
sql_create_context
CREATE TABLE table_name_45 ( elevation__m_ INTEGER, prominence__m_ INTEGER )
How much Elevation (m) has a Prominence (m) larger than 1,754?
SELECT SUM(elevation__m_) FROM table_name_45 WHERE prominence__m_ > 1 OFFSET 754
sql_create_context
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, ...
从13年5月11日到2020年4月11日这段时间,列出患者杨丹红所有检验报告单的审核日期时间吗?
SELECT jybgb.SHSJ FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '杨...
css
CREATE TABLE table_74177 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Who had the most assists and how many did they have on October 7?
SELECT "High assists" FROM table_74177 WHERE "Date" = 'October 7'
wikisql
CREATE TABLE table_25155 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text )
What was the partner count when the opponents in the final was forget leconte?
SELECT COUNT("Partner") FROM table_25155 WHERE "Opponents in the final" = 'Forget Leconte'
wikisql
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Comments ( Id number, PostId num...
Upvoted questions closed as duplicate of downvoted one.
SELECT s.Id AS "post_link", s.Score, MAX(t.Score) AS tScore FROM Posts AS t INNER JOIN PostLinks AS l ON t.Id = l.RelatedPostId INNER JOIN Posts AS s ON s.Id = l.PostId WHERE s.Score >= '##minscore:int?20##' AND l.LinkTypeId = 3 GROUP BY s.Id, s.Score ORDER BY MAX(t.Score) LIMIT 200
sede
CREATE TABLE table_72614 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" real )
When it is October 25, 1981 who is the opponent?
SELECT "Opponent" FROM table_72614 WHERE "Date" = 'October 25, 1981'
wikisql
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
列出在2001年9月1日到2013年5月9日内患者72522384被开出的所有检验报告单的检验报告单号分别是哪些?
(SELECT jybgb.BGDH 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 = '72522384' AND jybgb.BGRQ BETWEEN '2001-09-01' AND '2013-05-09') UNI...
css
CREATE TABLE table_21501564_1 ( original_artist VARCHAR, result VARCHAR )
Who was the originally artist when Jasmine Murray was selected?
SELECT original_artist FROM table_21501564_1 WHERE result = "Selected"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
How many catholic religious background patients had a wbc pleural lab test?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "CATHOLIC" AND lab.label = "WBC, Pleural"
mimicsql_data
CREATE TABLE table_26700 ( "Episode" real, "Airdate" text, "Reward" text, "Immunity" text, "Eliminated" text, "Vote" text, "Finish" text )
Name the vote for 9th voted out day 22
SELECT "Vote" FROM table_26700 WHERE "Finish" = '9th Voted Out Day 22'
wikisql
CREATE TABLE county_public_safety ( county_id number, name text, population number, police_officers number, residents_per_officer number, case_burden number, crime_rate number, police_force text, location text ) CREATE TABLE city ( city_id number, county_id number, name ...
What are the names of counties that do not contain any cities?
SELECT name FROM county_public_safety WHERE NOT county_id IN (SELECT county_id FROM city)
spider
CREATE TABLE table_name_55 ( team VARCHAR, sport VARCHAR, nation_of_citizenship VARCHAR )
Which tennis team is from the United States?
SELECT team FROM table_name_55 WHERE sport = "tennis" AND nation_of_citizenship = "united states"
sql_create_context
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
Top 100 Accepted Answers Without Up-Votes.
SELECT question_id = q.Id, question_url = 'https://stackoverflow.com/q/' + CAST(q.Id AS TEXT(255)), q.ClosedDate, accepted_answer_id = a.Id, accepted_answer_url = 'https://stackoverflow.com/a/' + CAST(a.Id AS TEXT(255)), answer_score = a.Score FROM dbo.Posts AS q INNER JOIN dbo.Posts AS a ON a.Id = q.AcceptedAnswerId W...
sede
CREATE TABLE table_name_53 ( type VARCHAR, principal_activities VARCHAR )
Name the type for headquarters principal activites.
SELECT type FROM table_name_53 WHERE principal_activities = "headquarters"
sql_create_context
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE allergy ( allergy...
when did patient 018-99743 visit the hospital via emergency department for the last time since 6 years ago?
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '018-99743' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-6 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1
eicu
CREATE TABLE table_30413 ( "No. in Series" real, "No. in Season" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (millions)" text, "Original air date" text )
How many episodes had 11.86 million US viewers?
SELECT COUNT("No. in Series") FROM table_30413 WHERE "U.S. viewers (millions)" = '11.86'
wikisql
CREATE TABLE table_name_9 ( loss VARCHAR, opponent VARCHAR, record VARCHAR )
What was the loss of the game against the Angels with a 26-30 record?
SELECT loss FROM table_name_9 WHERE opponent = "angels" AND record = "26-30"
sql_create_context
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, econ...
find the cheapest one way fare from PITTSBURGH to 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.c...
atis
CREATE TABLE Invoice_Line_Items ( order_item_id INTEGER, invoice_number INTEGER, product_id INTEGER, product_title VARCHAR(80), product_quantity VARCHAR(50), product_price DECIMAL(19,4), derived_product_cost DECIMAL(19,4), derived_vat_payable DECIMAL(19,4), derived_total_cost DECIMAL...
Visualize a bar chart for what are the first names and ids for customers who have two or more accounts?, and order from high to low by the bars.
SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.customer_first_name DESC
nvbench
CREATE TABLE table_name_76 ( school VARCHAR, ihsaa_class VARCHAR, mascot VARCHAR )
Which School has an IHSAA Class of aaa, and a Mascot of saints?
SELECT school FROM table_name_76 WHERE ihsaa_class = "aaa" AND mascot = "saints"
sql_create_context
CREATE TABLE table_name_11 ( outcome VARCHAR, event VARCHAR, year VARCHAR )
What was the Outcome in 1983 of the WD Event?
SELECT outcome FROM table_name_11 WHERE event = "wd" AND year = "1983"
sql_create_context
CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Movie ( mID int, title text, year int, director text )
What are the average star ratings of each movie title? Could you return me a bar chart?, rank in desc by the Y please.
SELECT title, AVG(stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY AVG(stars) DESC
nvbench
CREATE TABLE table_9100 ( "Region (year)" text, "No. 1" text, "No. 2" text, "No. 3" text, "No. 4" text, "No. 5" text, "No. 6" text, "No. 7" text, "No. 8" text, "No. 9" text, "No. 10" text )
Who was No. 3 when No. 5 James and No. 6 Mason?
SELECT "No. 3" FROM table_9100 WHERE "No. 5" = 'james' AND "No. 6" = 'mason'
wikisql
CREATE TABLE table_name_93 ( height VARCHAR, player VARCHAR )
How tall is Daniel Orton?
SELECT height FROM table_name_93 WHERE player = "daniel orton"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE v...
what is the ingesting method of vitamins/minerals po tabs?
SELECT DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'vitamins/minerals po tabs'
eicu
CREATE TABLE table_55538 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
What driver has grid 2 and over 72 laps?
SELECT "Driver" FROM table_55538 WHERE "Laps" > '72' AND "Grid" = '2'
wikisql
CREATE TABLE table_204_232 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
total number of medals earned by the 8th place finishers
SELECT SUM("total") FROM table_204_232 WHERE "rank" = 8
squall
CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREA...
what is the earliest flight you have leaving BOSTON heading to PHILADELPHIA
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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILAD...
atis
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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, ...
秦宛白患者以前的就诊医院是哪里
SELECT mzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '秦宛白' UNION SELECT hz_info_zyjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzj...
css
CREATE TABLE table_203_753 ( id number, "rank" number, "name" text, "caps" number, "goals" number, "years" text )
how many players were playing in 1990 ?
SELECT COUNT("name") FROM table_203_753 WHERE "years" <= 1990 AND "years" >= 1990
squall
CREATE TABLE table_name_23 ( entrant VARCHAR, driver VARCHAR )
kenneth mcalpine drove from which entrant?
SELECT entrant FROM table_name_23 WHERE driver = "kenneth mcalpine"
sql_create_context
CREATE TABLE table_name_40 ( status VARCHAR, name VARCHAR )
What is the status of the pterosaur named Cathayopterus?
SELECT status FROM table_name_40 WHERE name = "cathayopterus"
sql_create_context
CREATE TABLE table_name_76 ( quantity INTEGER, type VARCHAR )
What is the Quantity of Type 2-4-2t?
SELECT SUM(quantity) FROM table_name_76 WHERE type = "2-4-2t"
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
what is the number of patients whose age is less than 85 and lab test name is epithelial cells?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "85" AND lab.label = "Epithelial Cells"
mimicsql_data
CREATE TABLE table_26129220_2 ( party VARCHAR, senator VARCHAR )
What is the party affiliation for Senator David Goodman?
SELECT party FROM table_26129220_2 WHERE senator = "David Goodman"
sql_create_context
CREATE TABLE table_66556 ( "Date" text, "Location" text, "Lineup" text, "Assist/pass" text, "Score" text, "Result" text, "Competition" text )
What is the result at match reports?
SELECT "Result" FROM table_66556 WHERE "Location" = 'match reports'
wikisql
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
Finding Posts tagged only homework, which are not closed.
SELECT Posts.Id, Posts.Id AS "post_link" FROM Posts WHERE Tags = '<homework>' AND ClosedDate IS NULL ORDER BY Posts.LastEditDate
sede
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varc...
Show me manager_id by last name in a histogram, I want to display names in asc order please.
SELECT LAST_NAME, MANAGER_ID FROM employees ORDER BY LAST_NAME
nvbench
CREATE TABLE table_name_5 ( location VARCHAR, reason VARCHAR )
Which venues were closed because they were replaced?
SELECT location FROM table_name_5 WHERE reason = "replaced"
sql_create_context
CREATE TABLE table_79202 ( "Country" text, "Event" text, "Time" text, "Date" text, "Place" text )
What is the Place of the half marathon Event?
SELECT "Place" FROM table_79202 WHERE "Event" = 'half marathon'
wikisql
CREATE TABLE table_11621747_1 ( tournament VARCHAR, date VARCHAR )
What is the tournament of aug 29?
SELECT tournament FROM table_11621747_1 WHERE date = "Aug 29"
sql_create_context
CREATE TABLE table_56071 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the away team's score at windy hill?
SELECT "Away team score" FROM table_56071 WHERE "Venue" = 'windy hill'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
how many of the unmarried patients had icd9 code 4610?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.icd9_code = "4610"
mimicsql_data
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 number of patients admitted before the year 2200 had procedure under procedure icd9 code 3612?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2200" AND procedures.icd9_code = "3612"
mimicsql_data
CREATE TABLE zyjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
在2007-10-30之后,患者27160966有哪些门诊就诊的检验报告单?看一下门诊就诊的流水号
SELECT mzjzjlb.JZLSH 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 = '27160966' AND NOT mzjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ <= '2007-10-30' UNION SELECT mzjybgb.JZLSH FROM mzjybgb WHERE mzjybgb...
css
CREATE TABLE table_name_64 ( english VARCHAR, plautdietsch VARCHAR )
Which English has Plautdietsch of aupel?
SELECT english FROM table_name_64 WHERE plautdietsch = "aupel"
sql_create_context
CREATE TABLE table_21379 ( "Official Name" text, "Status" text, "Area km 2" text, "Population" real, "Census Ranking" text )
What is the population of each community with city status?
SELECT "Population" FROM table_21379 WHERE "Status" = 'City'
wikisql