context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_63550 ( "Position" real, "Name" text, "Played" real, "Drawn" real, "Lost" real, "Points" real )
How much Lost has Points larger than 15, and a Name of ev pegnitz?
SELECT COUNT("Lost") FROM table_63550 WHERE "Points" > '15' AND "Name" = 'ev pegnitz'
wikisql
CREATE TABLE accounts ( account_id number, customer_id number, account_name text, other_account_details text ) CREATE TABLE financial_transactions ( transaction_id number, previous_transaction_id number, account_id number, card_id number, transaction_type text, transaction_date ...
Count the number of customers who hold an account.
SELECT COUNT(DISTINCT customer_id) FROM accounts
spider
CREATE TABLE table_name_97 ( tonnage INTEGER, nationality VARCHAR, name_of_ship VARCHAR )
What was the average tonnage for the Siljan ship from Sweden?
SELECT AVG(tonnage) FROM table_name_97 WHERE nationality = "sweden" AND name_of_ship = "siljan"
sql_create_context
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE patients ( row_id number, subject_id number, ...
when was the first time that patient 54494 was prescribed with pregabalin during their last hospital encounter?
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54494 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.drug = 'pregabalin' ORDER BY prescriptions.startdate LIMIT 1
mimic_iii
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
患者64014857的身高和体重分别是多少?
SELECT zzmzjzjlb.SG, zzmzjzjlb.TZ FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '64014857' UNION SELECT fzzmzjzjlb.SG, fzzmzjzjlb.TZ FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJGDM = fzzmzjzjlb.YLJGDM AND hz_info.KH = f...
css
CREATE TABLE table_name_50 ( snatch INTEGER, bodyweight VARCHAR, clean_ VARCHAR, _jerk VARCHAR )
What is the snatch for the Clean & jerk of 145.0, and a Bodyweight larger than 76.22?
SELECT AVG(snatch) FROM table_name_50 WHERE clean_ & _jerk = "145.0" AND bodyweight > 76.22
sql_create_context
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...
QUESTIONS - Top 1000 Join the Users table with the Posts table to get Display Name with Location.
SELECT Posts.Id, PostTypeId, AcceptedAnswerId, OwnerUserId, DisplayName, Location, ParentId FROM Posts JOIN Users ON Posts.OwnerUserId = Users.Id WHERE PostTypeId = 1 LIMIT 1000
sede
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 ...
患者39436080954在门诊就诊时其就诊状态代码是多少叫什么名称?
SELECT JZZTDM, JZZTMC FROM mzjzjlb WHERE JZLSH = '39436080954'
css
CREATE TABLE table_3532 ( "English" text, "Japanese" text, "Kana spelling" text, "Revised Hepburn" text, "Kunrei-shiki" text, "Nihon-shiki" text )
when chiji is revised hepburn what are all the english
SELECT "English" FROM table_3532 WHERE "Revised Hepburn" = 'chiji'
wikisql
CREATE TABLE table_66082 ( "Frequency" text, "Call sign" text, "Branding" text, "Format" text, "Owner" text )
What is the frequency for the active rock format?
SELECT "Frequency" FROM table_66082 WHERE "Format" = 'active rock'
wikisql
CREATE TABLE table_name_17 ( silver VARCHAR, location VARCHAR )
What Silver has the Location of Guangzhou?
SELECT silver FROM table_name_17 WHERE location = "guangzhou"
sql_create_context
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 prescription...
Give me the number of patients who were diagnosed for aftercare for healing traumatic fracture of lower leg and whose lab test fluid was pleural.
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.long_title = "Aftercare for healing traumatic fracture of lower leg" AND lab.fluid = "Pleural"
mimicsql_data
CREATE TABLE table_159614_2 ( opinion_research_centre__opc_ VARCHAR, national_opinion_polls__nop_ VARCHAR )
On all other parties the National option polls are at 1.3% where as the opinion research pole is at what percentage?
SELECT opinion_research_centre__opc_ FROM table_159614_2 WHERE national_opinion_polls__nop_ = "1.3%"
sql_create_context
CREATE TABLE table_37620 ( "Game #" real, "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text, "Points" real )
Which average Game # has a Home of san jose, and Points smaller than 71?
SELECT AVG("Game #") FROM table_37620 WHERE "Home" = 'san jose' AND "Points" < '71'
wikisql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
For those records from the products and each product's manufacturer, give me the comparison about the average of price over the headquarter , and group by attribute headquarter by a bar chart.
SELECT Headquarter, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
nvbench
CREATE TABLE table_2602958_4 ( writer_s_ VARCHAR, no VARCHAR )
Who wrote episode number 45?
SELECT writer_s_ FROM table_2602958_4 WHERE no = 45
sql_create_context
CREATE TABLE table_name_2 ( round VARCHAR, player VARCHAR )
What round did Ray Kurpis play?
SELECT round FROM table_name_2 WHERE player = "ray kurpis"
sql_create_context
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
In which subject area have most of my C 's been earned ?
SELECT DISTINCT DERIVED_TABLEalias0.DERIVED_FIELDalias1 FROM (SELECT AREAalias0.area, COUNT(*) INNER JOIN student_record ON student_record.course_id = AREAalias0.course_id WHERE student_record.grade LIKE 'C' AND student_record.student_id = 1 GROUP BY AREAalias0.area) AS DERIVED_TABLEalias0 WHERE DERIVED_TABLEalias0.DER...
advising
CREATE TABLE table_77649 ( "Team" text, "Home city" text, "Stadium" text, "Capacity" real, "2011\u201312 season" text )
What is the home city for angelo massimino stadium?
SELECT "Home city" FROM table_77649 WHERE "Stadium" = 'angelo massimino'
wikisql
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime t...
what are the top four most frequent specimen tests ordered for patients during the same month after they have been diagnosed with excessive cold nec?
SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 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_...
mimic_iii
CREATE TABLE table_name_17 ( year INTEGER, notes VARCHAR )
Which Year that has Notes of dnf?
SELECT MIN(year) FROM table_name_17 WHERE notes = "dnf"
sql_create_context
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, ...
retrieve patient ids of individuals who have been diagnosed with stroke until 2104.
SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'stroke' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104')
eicu
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
Tell me the route of administration and code of Rituximab.
SELECT prescriptions.formulary_drug_cd, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Rituximab"
mimicsql_data
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime tim...
calculate the four year survival rate among patients who were prescribed valproate sodium after having been diagnosed with resp obstr-inhal obj nec.
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd...
mimic_iii
CREATE TABLE table_name_37 ( result VARCHAR, round INTEGER )
Which Result has a Round larger than 17?
SELECT result FROM table_name_37 WHERE round > 17
sql_create_context
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH ...
看一下在医疗就诊47040795195中给患者任施诗做检验报告的审核人员有哪些?查一下他们的工号
SELECT SHRGH, SHRXM FROM jybgb WHERE JZLSH = '47040795195'
css
CREATE TABLE table_9271 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
Which country has a score of 73-74-69=216?
SELECT "Country" FROM table_9271 WHERE "Score" = '73-74-69=216'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
give me the number of patients whose admission location is phys referral/normal deli and diagnoses long title is suicide and self-inflicted poisoning by tranquilizers and other psychotropic agents?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND diagnoses.long_title = "Suicide and self-inflicted poisoning by tranquilizers and other psychotropic agents"
mimicsql_data
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, ...
从两千年二月一日零三年四月二十三日,医疗机构8958826的医疗费总数是多少
SELECT SUM(t_kc24.MED_AMOUT) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '8958826' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-02-01' AND '2003-04-23' UNION SELECT SUM(t_kc24.MED_AMOUT) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE f...
css
CREATE TABLE table_51212 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the venue when Collingwood was the home team?
SELECT "Venue" FROM table_51212 WHERE "Home team" = 'collingwood'
wikisql
CREATE TABLE table_21938 ( "Round" text, "Main date" text, "Number of fixtures" real, "Clubs" text, "New entries this round" text, "Prize money" text, "Player of the Round" text )
How many categories of new entries this round are there for the fourth round proper?
SELECT COUNT("New entries this round") FROM table_21938 WHERE "Round" = 'Fourth Round Proper'
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 ) ...
provide the number of patients whose admission year is less than 2125 and diagnoses long title is unspecified intestinal obstruction?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2125" AND diagnoses.long_title = "Unspecified intestinal obstruction"
mimicsql_data
CREATE TABLE table_203_541 ( id number, "games" text, "host city" text, "dates" text, "nations" number, "participants" number, "events" number )
what was the number of nations that participated in the 1996 summer olympics ?
SELECT "nations" FROM table_203_541 WHERE "games" = '1996 summer olympics'
squall
CREATE TABLE table_name_10 ( source_version VARCHAR, target_version VARCHAR )
What is Source Version, when Target Version is Java 7, 6, 5?
SELECT source_version FROM table_name_10 WHERE target_version = "java 7, 6, 5"
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...
自06年6月26至07年10月24日患者葛学民买西药的次数
SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '葛学民' AND t_kc22.STA_DATE BETWEEN '2006-06-26' AND '2007-10-24' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '葛学民' A...
css
CREATE TABLE table_name_7 ( total_votes INTEGER, outcome VARCHAR, candidate VARCHAR )
How many votes did Lee Teng-Hui receive when he was elected?
SELECT MAX(total_votes) FROM table_name_7 WHERE outcome = "elected" AND candidate = "lee teng-hui"
sql_create_context
CREATE TABLE table_25402 ( "Season" real, "Episodes" real, "Timeslot (ET)" text, "Season Premiere" text, "Season Finale" text, "TV Season" text, "Rank" text, "Viewers (in millions)" text )
What was the highest amount of episodes for the season with 5.74 million viewers?
SELECT MAX("Episodes") FROM table_25402 WHERE "Viewers (in millions)" = '5.74'
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...
21569454871这次住院就诊的出院科室是哪个?代码又是什么
SELECT zyjzjlb.CYKSDM, zyjzjlb.CYKSMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '21569454871'
css
CREATE TABLE table_204_760 ( id number, "year" number, "competition" text, "venue" text, "position" text, "event" text, "notes" text )
what was the last competition in which a position of 2nd was achieved ?
SELECT "competition" FROM table_204_760 WHERE "position" = 2 ORDER BY "year" DESC LIMIT 1
squall
CREATE TABLE table_name_10 ( year VARCHAR, chassis VARCHAR, engine VARCHAR, rank VARCHAR )
How many years has an engine of audi 3.6l turbo v8 and 1st as the rank with an audi r8r as the chassis?
SELECT COUNT(year) FROM table_name_10 WHERE engine = "audi 3.6l turbo v8" AND rank = "1st" AND chassis = "audi r8r"
sql_create_context
CREATE TABLE table_name_62 ( home VARCHAR, record VARCHAR, visitor VARCHAR, score VARCHAR )
Which Home has a Visitor of quebec nordiques, and a Score of 3 4, and a Record of 8 8 1?
SELECT home FROM table_name_62 WHERE visitor = "quebec nordiques" AND score = "3–4" AND record = "8–8–1"
sql_create_context
CREATE TABLE table_31860 ( "Year" real, "Tournament" text, "Venue" text, "Result" text, "Extra" text )
What is the result for a year later than 2002?
SELECT "Result" FROM table_31860 WHERE "Year" > '2002'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
以前69072554这个患者是在哪就真的
SELECT mzjzjlb.YLJGDM 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 = '69072554' UNION SELECT zyjzjlb.YLJGDM FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX ...
css
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, fligh...
from PHOENIX to LAS VEGAS on saturday
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LAS VEGAS' AND date_day.day_number = 26 AND date_day.month_number = 7 AND...
atis
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostFeedback ( Id number, PostId numb...
Count answers per tag per year.
SELECT COUNT(a.Id) FROM Posts AS a LEFT JOIN Posts AS p ON a.ParentId = p.Id LEFT JOIN PostTags AS pt ON p.Id = pt.PostId LEFT JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName = '##TagName:string##' AND YEAR(p.CreationDate) = 2019 AND p.DeletionDate IS NULL
sede
CREATE TABLE table_1140074_2 ( race VARCHAR, date VARCHAR )
what's the race winner with date being 12 june
SELECT race AS Winner FROM table_1140074_2 WHERE date = "12 June"
sql_create_context
CREATE TABLE table_name_90 ( race VARCHAR, position VARCHAR, speed VARCHAR )
Which race has a position of 3rd and a speed of 123.628?
SELECT race FROM table_name_90 WHERE position = "3rd" AND speed = "123.628"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
what is discharge location of subject id 3343?
SELECT demographic.discharge_location FROM demographic WHERE demographic.subject_id = "3343"
mimicsql_data
CREATE TABLE table_52506 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
In the game at Victoria Park, what was the number of people in the crowd?
SELECT SUM("Crowd") FROM table_52506 WHERE "Venue" = 'victoria park'
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,...
列出16640319154的医疗就诊中患者被开出的所有药品编码和名称及其金额,除去最低的金额之外,按照金额降序排列
SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '16640319154' AND AMOUNT > (SELECT MIN(AMOUNT) FROM t_kc22 WHERE MED_CLINIC_ID = '16640319154') ORDER BY AMOUNT DESC
css
CREATE TABLE table_79690 ( "Nat." text, "Name" text, "Since" real, "Goals" real, "Ends" real, "Transfer fee" text )
What is the total number of ends after 2006 with a nationality of ita and 0 goals?
SELECT COUNT("Ends") FROM table_79690 WHERE "Since" > '2006' AND "Nat." = 'ita' AND "Goals" < '0'
wikisql
CREATE TABLE table_72562 ( "Rank" text, "Common of" text, "Population" real, "Area (km 2 )" text, "Density (inhabitants/km 2 )" text, "Altitude (mslm)" real )
How many altitudes does the common with an area of 130.7 km^2 have?
SELECT COUNT("Altitude (mslm)") FROM table_72562 WHERE "Area (km 2 )" = '130.7'
wikisql
CREATE TABLE table_14345690_5 ( famous_for VARCHAR, finished VARCHAR )
What is the famous for where the finished is 5th?
SELECT famous_for FROM table_14345690_5 WHERE finished = "5th"
sql_create_context
CREATE TABLE table_name_45 ( launched VARCHAR, country VARCHAR )
What is the Launched from a Country that is spain?
SELECT launched FROM table_name_45 WHERE country = "spain"
sql_create_context
CREATE TABLE table_name_75 ( points_1 VARCHAR, lost VARCHAR, position VARCHAR, goals_for VARCHAR )
What is listed under points 1 when the position was greater than 4, there were 54 goals for and more than 11 losses?
SELECT points_1 FROM table_name_75 WHERE position > 4 AND goals_for = 54 AND lost > 11
sql_create_context
CREATE TABLE table_59386 ( "Year" real, "Dates" text, "Champion" text, "Country" text, "Score" text, "Purse (\u00a5)" real, "Winner's share (\u00a5)" real )
What is the lowest Winner's share ( ) in 2011?
SELECT MIN("Winner's share (\u00a5)") FROM table_59386 WHERE "Year" = '2011'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid num...
tell me the name of the procedure that patient 015-66570 was first received in 2105?
SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-66570')) AND STRFTIME('%y', treatment.treatmenttime) = '2105'...
eicu
CREATE TABLE table_26261072_1 ( series__number INTEGER, written_by VARCHAR, directed_by VARCHAR )
Name the least series number written by brenda hampton and directed by burt brinckerhoff
SELECT MIN(series__number) FROM table_26261072_1 WHERE written_by = "Brenda Hampton" AND directed_by = "Burt Brinckerhoff"
sql_create_context
CREATE TABLE Bookings ( Booking_ID INTEGER, Customer_ID INTEGER, Workshop_Group_ID VARCHAR(100), Status_Code CHAR(15), Store_ID INTEGER, Order_Date DATETIME, Planned_Delivery_Date DATETIME, Actual_Delivery_Date DATETIME, Other_Order_Details VARCHAR(255) ) CREATE TABLE Drama_Workshop...
What are the number of the descriptions of the service types with product price above 100?, and could you list in descending by the how many service type description please?
SELECT Service_Type_Description, COUNT(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 GROUP BY Service_Type_Description ORDER BY COUNT(Service_Type_Description) DESC
nvbench
CREATE TABLE table_name_67 ( loss VARCHAR, record VARCHAR )
with a record of 68-80 what was the loss?
SELECT loss FROM table_name_67 WHERE record = "68-80"
sql_create_context
CREATE TABLE table_name_7 ( icao VARCHAR, country VARCHAR, iata VARCHAR )
What is the ICAO for Denmark, and the IATA is bll?
SELECT icao FROM table_name_7 WHERE country = "denmark" AND iata = "bll"
sql_create_context
CREATE TABLE table_14342480_15 ( player VARCHAR, touchdowns VARCHAR )
Which player scored 14 touchdowns?
SELECT player FROM table_14342480_15 WHERE touchdowns = 14
sql_create_context
CREATE TABLE table_204_409 ( id number, "date" text, "race name" text, "location" text, "uci rating" number, "winner" text, "team" text )
what was the uci rating of the last race of the tour ?
SELECT "uci rating" FROM table_204_409 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE table_name_8 ( opponent VARCHAR, date VARCHAR )
Who was the opponent on December 2, 1962?
SELECT opponent FROM table_name_8 WHERE date = "december 2, 1962"
sql_create_context
CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text ) CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int )
Stacked bar chart of how many nationality for with each Type in each nationality, I want to list how many nationality from high to low order.
SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY COUNT(Nationality) DESC
nvbench
CREATE TABLE table_43176 ( "Name" text, "Tenure" text, "Courtesy title" text, "Court Rank" text, "revenues" text )
What is the Revenues of Ukyo-Daiyu?
SELECT "revenues" FROM table_43176 WHERE "Courtesy title" = 'ukyo-daiyu'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
calculate the average age of male patients who were born after 1821.
SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.dob_year > "1821"
mimicsql_data
CREATE TABLE table_name_66 ( points INTEGER, wins VARCHAR, year VARCHAR, class VARCHAR )
What is the highest points value for 1962, in the 125cc class, and with 0 wins?
SELECT MAX(points) FROM table_name_66 WHERE year = 1962 AND class = "125cc" AND wins < 0
sql_create_context
CREATE TABLE table_name_87 ( total INTEGER, gold VARCHAR, silver VARCHAR, nation VARCHAR )
What is the sum of Total, when Silver is greater than 1, when Nation is Germany (GER), and when Gold is less than 1?
SELECT SUM(total) FROM table_name_87 WHERE silver > 1 AND nation = "germany (ger)" AND gold < 1
sql_create_context
CREATE TABLE block ( blockfloor number, blockcode number ) CREATE TABLE undergoes ( patient number, procedures number, stay number, dateundergoes time, physician number, assistingnurse number ) CREATE TABLE procedures ( code number, name text, cost number ) CREATE TABLE on...
What are the names of the physician who prescribed the highest dose?
SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1
spider
CREATE TABLE table_26218783_6 ( rk VARCHAR, new_points VARCHAR )
If the new points were 5760, what is the RK?
SELECT rk FROM table_26218783_6 WHERE new_points = 5760
sql_create_context
CREATE TABLE table_58884 ( "Circuit" text, "City / State" text, "Date" text, "Winner" text, "Team" text )
What is City / State, when Winner is 'Rohan Onslow', and when Circuit is 'Oran Park Raceway'?
SELECT "City / State" FROM table_58884 WHERE "Winner" = 'rohan onslow' AND "Circuit" = 'oran park raceway'
wikisql
CREATE TABLE table_46482 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
Who was the player who placed t10?
SELECT "Player" FROM table_46482 WHERE "Place" = 't10'
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...
列出那家医院8862206根据不同的科室名称和入院诊断疾病名称所有医疗就诊记录内患者保留平均年龄小于5岁的记录的平均年龄是哪些?
SELECT MED_ORG_DEPT_NM, IN_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '8862206' GROUP BY MED_ORG_DEPT_NM, IN_DIAG_DIS_NM HAVING AVG(PERSON_AGE) < 5
css
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, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
病患94819953从2018年6月26日起到2018年10月5日结束内自费金额高于1549.15元的药品量都包括什么呀?
SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '94819953' AND t_kc22.STA_DATE BETWEEN '2018-06-26' AND '2018-10-05' AND t_kc22.SELF_PAY_AMO > 1549.15 UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwy...
css
CREATE TABLE addresses ( address_id number, line_1_number_building text, city text, zip_postcode text, state_province_county text, country text ) CREATE TABLE customers ( customer_id number, customer_address_id number, customer_status_code text, date_became_customer time, da...
What is the birthday of the staff member with first name as Janessa and last name as Sawayn?
SELECT date_of_birth FROM staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
spider
CREATE TABLE table_25429986_1 ( jockey VARCHAR, position VARCHAR )
who isthe jockey in 10th position?
SELECT jockey FROM table_25429986_1 WHERE position = "10th"
sql_create_context
CREATE TABLE table_204_170 ( id number, "player" text, "position" text, "games\nstarted" text, "hometown" text, "height" text, "weight" number, "age" number )
who weighed the most ?
SELECT "player" FROM table_204_170 ORDER BY "weight" DESC LIMIT 1
squall
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
what is patient 013-38992's sao2 change last measured on the current intensive care unit visit compared to the value first measured on the current intensive care unit 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 = '013-38992') AND patient.unitdischargetime IS NULL) AND...
eicu
CREATE TABLE table_15411 ( "Name" text, "Entered Office" text, "Left Office" text, "Party" text, "First Minister" text )
What is the name of the party called name?
SELECT "Party" FROM table_15411 WHERE "Name" = 'name'
wikisql
CREATE TABLE table_80443 ( "D 48 +" text, "D 47 +" text, "D 46 +" text, "D 45 O" text, "D 44 O" text, "D 43 \u221a" text, "D 42 \u221a" text, "D 41 \u221a" text )
What is the value of D 45 O, when the value of D 41 is r 41 ?
SELECT "D 45 O" FROM table_80443 WHERE "D 41 \u221a" = 'r 41 √'
wikisql
CREATE TABLE table_73227 ( "County" text, "Obama%" text, "Obama#" real, "McCain%" text, "McCain#" real )
What is the total number of McCain vote totals where Obama percentages was 17.34%?
SELECT COUNT("McCain#") FROM table_73227 WHERE "Obama%" = '17.34%'
wikisql
CREATE TABLE table_66249 ( "Class" text, "Wheel arrangement" text, "Fleet number(s)" text, "Manufacturer" text, "Serial numbers" text, "Year made" text, "Quantity made" text, "Quantity preserved" text )
What is the quantity preserved for fleet number(s) 3000 3015?
SELECT "Quantity preserved" FROM table_66249 WHERE "Fleet number(s)" = '3000–3015'
wikisql
CREATE TABLE table_name_89 ( type VARCHAR, host_interface VARCHAR )
I want the type for host interface of pci saa7146 tmx320av7111
SELECT type FROM table_name_89 WHERE host_interface = "pci saa7146 tmx320av7111"
sql_create_context
CREATE TABLE table_74650 ( "Rank" text, "County" text, "Population (1960)" real, "Population (2000)" real, "Population (2040)" real )
What was Oslo's population in 1960, with a population of 507,467 in 2000?
SELECT AVG("Population (1960)") FROM table_74650 WHERE "County" = 'oslo' AND "Population (2000)" > '507,467'
wikisql
CREATE TABLE table_name_29 ( venue VARCHAR, home_team VARCHAR )
Where was the game played where the home team was Collingwood?
SELECT venue FROM table_name_29 WHERE home_team = "collingwood"
sql_create_context
CREATE TABLE table_name_86 ( athletics_nickname VARCHAR, founded VARCHAR )
Which athletics nickname was founded in 1872?
SELECT athletics_nickname FROM table_name_86 WHERE founded = "1872"
sql_create_context
CREATE TABLE table_name_61 ( race VARCHAR, position VARCHAR )
What race is in the 5th position?
SELECT race FROM table_name_61 WHERE position = "5th"
sql_create_context
CREATE TABLE table_name_21 ( rider VARCHAR, manufacturer VARCHAR, grid VARCHAR )
Who is the rider with a yamaha manufacturer and a 17 grid?
SELECT rider FROM table_name_21 WHERE manufacturer = "yamaha" AND grid = "17"
sql_create_context
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
show me the top three most common diagnoses of patients of age 40s in the last 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_61307 ( "Team" text, "2003\u201304 Pts" text, "2004\u201305 Pts" text, "2005\u201306 Pts" real, "Total Pts" real, "Total Pld" real )
Which 2005 06 Pts has a 2004 05 Pts of 48?
SELECT MIN("2005\u201306 Pts") FROM table_61307 WHERE "2004\u201305 Pts" = '48'
wikisql
CREATE TABLE table_4312 ( "Portfolio" text, "Minister" text, "Took office" text, "Left office" text, "Party" text )
Tell me the portfolio of minister of carlo giovanardi
SELECT "Portfolio" FROM table_4312 WHERE "Minister" = 'carlo giovanardi'
wikisql
CREATE TABLE table_1421 ( "Candidate" text, "State Delegate" real, "Percentage" text, "Delegates" real, "Counties Carries" real )
What is the highest number of Counties carries?
SELECT MAX("Counties Carries") FROM table_1421
wikisql
CREATE TABLE table_78322 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
Where does Iceland rank with under 19 silvers?
SELECT MAX("Rank") FROM table_78322 WHERE "Nation" = 'iceland' AND "Silver" < '19'
wikisql
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, ...
how did patient 96344 last entered hospital since 2103?
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 96344 AND STRFTIME('%y', admissions.admittime) >= '2103' ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
CREATE TABLE table_29932 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Name the location attendance for austin daye , tracy mcgrady , tayshaun prince (20)
SELECT "Location Attendance" FROM table_29932 WHERE "High points" = 'Austin Daye , Tracy McGrady , Tayshaun Prince (20)'
wikisql
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNoticeTypes ( Id number, ...
How many posts have the exact same number of answers?.
SELECT PostTypeId, COUNT(AnswerCount) AS Numberofanswers FROM Posts GROUP BY PostTypeId
sede
CREATE TABLE table_name_64 ( category VARCHAR, title VARCHAR, result VARCHAR, year VARCHAR )
What Category has a Result of Nominated, Year of 2006, and the Title of Pierrepoint?
SELECT category FROM table_name_64 WHERE result = "nominated" AND year = 2006 AND title = "pierrepoint"
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...
give me the number of patients whose religion is jehovah's witness and item id is 51514?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "JEHOVAH'S WITNESS" AND lab.itemid = "51514"
mimicsql_data
CREATE TABLE Addresses ( City_Town VARCHAR, Address_ID VARCHAR ) CREATE TABLE Drama_Workshop_Groups ( Address_ID VARCHAR )
Show all cities along with the number of drama workshop groups in each city.
SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town
sql_create_context