context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_3272 ( "Form (to sing)" text, "Latin" text, "Nuorese Sardinian" text, "Spanish" text, "Brazilian Portuguese" text, "Central Catalan" text, "Romanian" text, "French" text )
What is the form ('to sing') when brazilian portuguese is [k t mus]?
SELECT "Form (to sing)" FROM table_3272 WHERE "Brazilian Portuguese" = '[kɐ̃ˈtẽmus]'
wikisql
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE T...
select posts with a link to a site.
SELECT Body FROM Posts WHERE Body LIKE '%qbox%'
sede
CREATE TABLE table_14603212_1 ( school_year VARCHAR, class_aA VARCHAR, Franklin VARCHAR )
For franklin of class aa, which school years does this occur?
SELECT school_year FROM table_14603212_1 WHERE class_aA = Franklin
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 admission year is less than 2167 and procedure short title is adm inhal nitric oxide?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2167" AND procedures.short_title = "Adm inhal nitric oxide"
mimicsql_data
CREATE TABLE table_name_1 ( wins INTEGER, byes INTEGER )
How many wins for the team with fewer than 2 byes?
SELECT AVG(wins) FROM table_name_1 WHERE byes < 2
sql_create_context
CREATE TABLE table_23449363_1 ( round VARCHAR, new_entries_this_round VARCHAR )
Which round had 24 new entries?
SELECT round FROM table_23449363_1 WHERE new_entries_this_round = "24"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
in this month, have gabapentin 300 mg po caps, potassium chloride 20 meq ud liq or amiodarone hcl 900 mg/18ml iv soln been prescribed for patient 016-18575?
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-18575')) AND medication.drugname IN ('gabapentin 300 mg po caps', 'pot...
eicu
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE proce...
what's the minimum total cost of the hospital that involves a drug called sodium acetate until 4 years ago?
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'sodium acetate') AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY cost.hadm_id) AS t1
mimic_iii
CREATE TABLE table_17629 ( "Municipality" text, "Population" real, "Police officers" real, "Residents per officer" real, "Total costs (2005)" text, "Cost per capita" text, "Case burden" real, "Crime rate per 1,000 people" real, "Police force" text )
If the number of police officers is 94, what is the lowest population number?
SELECT MIN("Population") FROM table_17629 WHERE "Police officers" = '94'
wikisql
CREATE TABLE table_1341738_34 ( party VARCHAR, incumbent VARCHAR )
Which party is Lawrence H. Fountain part of?
SELECT party FROM table_1341738_34 WHERE incumbent = "Lawrence H. Fountain"
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 four most frequent intake events this year?
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT inputevents_cv.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM inputevents_cv WHERE DATETIME(inputevents_cv.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY inputevents_cv.it...
mimic_iii
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospita...
had patient 021-250695 visited the emergency room since 6 years ago?
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '021-250695' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-6 year')
eicu
CREATE TABLE table_61639 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What is Date, when Away Team is 'Barnet'?
SELECT "Date" FROM table_61639 WHERE "Away team" = 'barnet'
wikisql
CREATE TABLE stock ( Shop_ID int, Device_ID int, Quantity int ) CREATE TABLE shop ( Shop_ID int, Shop_Name text, Location text, Open_Date text, Open_Year int ) CREATE TABLE device ( Device_ID int, Device text, Carrier text, Package_Version text, Applications text, ...
A bar chart about what are the different software platforms for devices, and how many devices have each?, and could you display by the x-axis in desc?
SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform ORDER BY Software_Platform DESC
nvbench
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,...
How many patients admitted before the year 2127 had a lab test for thyroxine (t4)?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2127" AND lab.label = "Thyroxine (T4)"
mimicsql_data
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...
Questions with a given string that a given user answered.
SELECT q.Id AS "post_link", q.Score AS "question_score", q.ViewCount, q.Tags, a.Score AS "answer_score" FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE a.OwnerUserId = '##UserID:int##' AND (q.Body LIKE '%' + '##SearchString:string##' + '%' OR q.Title LIKE '%' + '##SearchString:string##' + '%')
sede
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number...
show me the five most common diagnostics during the previous year?
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 5
eicu
CREATE TABLE table_58768 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" real )
What county has less than $188 and a score of 74-76-73-75=298?
SELECT "Country" FROM table_58768 WHERE "Money ( $ )" < '188' AND "Score" = '74-76-73-75=298'
wikisql
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_na...
i would like to book a flight for 8 27 with US from BALTIMORE to OAKLAND what flights do you have available
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 = 'OAKLAND' AND date_day.day_number = 27 AND date_day.month_number = 8 AND ...
atis
CREATE TABLE table_303 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text )
How many offensive line players played for a college in Alabama?
SELECT COUNT("Hometown") FROM table_303 WHERE "College" = 'Alabama' AND "Position" = 'Offensive line'
wikisql
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 microlab ( microl...
count the number of patients that are admitted to the hospital since 2101.
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE STRFTIME('%y', patient.hospitaladmittime) >= '2101'
eicu
CREATE TABLE table_25360865_1 ( height VARCHAR, name VARCHAR )
Name the height for demetrius jemison
SELECT height FROM table_25360865_1 WHERE name = "Demetrius Jemison"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
what is the number of patients whose discharge location is left against medical advi and procedure short title is int inser lead atri-vent?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" AND procedures.short_title = "Int inser lead atri-vent"
mimicsql_data
CREATE TABLE table_63981 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
what is the result when the venue is singapore on september 8, 1996?
SELECT "Result" FROM table_63981 WHERE "Venue" = 'singapore' AND "Date" = 'september 8, 1996'
wikisql
CREATE TABLE table_name_43 ( date VARCHAR, week VARCHAR, result VARCHAR )
When was there a result of w 65-20 after week 6?
SELECT date FROM table_name_43 WHERE week > 6 AND result = "w 65-20"
sql_create_context
CREATE TABLE table_73127 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
Who came from the University of Michigan (NCAA) team?
SELECT "Player" FROM table_73127 WHERE "College/junior/club team" = 'University of Michigan (NCAA)'
wikisql
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer...
which UA flight flies across this continent and leaves from BOSTON goes to DALLAS and makes a stopover in PHILADELPHIA
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2.ci...
atis
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, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, ...
Which class is tougher among 498 and 552 ?
SELECT DISTINCT course.number FROM course, program_course WHERE (course.number = 498 OR course.number = 552) AND course.department = 'EECS' AND program_course.course_id = course.course_id ORDER BY program_course.workload DESC LIMIT 1
advising
CREATE TABLE table_18604 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
Who are the contenders In the New York 29 polling area race?
SELECT "Candidates" FROM table_18604 WHERE "District" = 'New York 29'
wikisql
CREATE TABLE table_57789 ( "Phoneme" text, "Realization" text, "Environment" text, "Example" text, "Gloss" text )
Name the phoneme when the example is /ums /
SELECT "Phoneme" FROM table_57789 WHERE "Example" = '/umsʁ/'
wikisql
CREATE TABLE table_36335 ( "ISSN" text, "Language" text, "Country" text, "Frequency" text, "Publication range" text, "Status" text, "Document Type" text )
What is the language with a France publication range of 1992 2003?
SELECT "Language" FROM table_36335 WHERE "Country" = 'france' AND "Publication range" = '1992–2003'
wikisql
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
Give me a histogram for how many rooms cost more than 120, for each different decor?, could you order from high to low by the Y-axis?
SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_6493 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text )
Which Score has a Home team of yeovil town won 5 3 on penalties?
SELECT "Score" FROM table_6493 WHERE "Home team" = 'yeovil town won 5–3 on penalties'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
what is maximum age of patients whose ethnicity is white - russian and admission year is greater than or equal to 2139?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.admityear >= "2139"
mimicsql_data
CREATE TABLE table_10528691_4 ( maximum_memory VARCHAR, discontinued VARCHAR )
What is the maximum memory for the model discontinued in November 2001?
SELECT maximum_memory FROM table_10528691_4 WHERE discontinued = "November 2001"
sql_create_context
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...
参照医疗就诊37228773011找出与其医疗总花费相同的患者的医疗就诊记录的ID、人员ID以及他们的姓名、公民身份号码、性别和年龄的具体信息?
SELECT t_kc21.MED_CLINIC_ID, t_kc21.PERSON_ID, t_kc21.PERSON_NM, t_kc21.IDENTITY_CARD, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT MED_AMOUT FROM t_kc24 WHERE MED_CLINIC_ID = '37228773011')
css
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date...
Learning T-SQL: SELECT * FROM Tags;. Gimme all the tags. This is the first step in understanding the query to render this page: http://stackoverflow.com/tags
SELECT * FROM dbo.Tags
sede
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 patients whose gender is f and year of birth is less than 1821?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.dob_year < "1821"
mimicsql_data
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 ...
what was the last ward id that patient 16472 went during this year?
SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16472) AND NOT transfers.wardid IS NULL AND DATETIME(transfers.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY transfers.intime DESC LIMIT 1
mimic_iii
CREATE TABLE table_name_28 ( date VARCHAR, record VARCHAR )
On what date was the team's record 61-66?
SELECT date FROM table_name_28 WHERE record = "61-66"
sql_create_context
CREATE TABLE table_7863 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
What is the average goal difference of club cultural leonesa, which has more than 27 points and less than 9 losses?
SELECT AVG("Goal Difference") FROM table_7863 WHERE "Points" > '27' AND "Losses" < '9' AND "Club" = 'cultural leonesa'
wikisql
CREATE TABLE table_name_68 ( year VARCHAR, award VARCHAR, result VARCHAR, category VARCHAR )
What is the total number of Year, when Result is 'Nominated', when Category is 'Outstanding Actor in a Musical', and when Award is 'Drama Desk Award'?
SELECT COUNT(year) FROM table_name_68 WHERE result = "nominated" AND category = "outstanding actor in a musical" AND award = "drama desk award"
sql_create_context
CREATE TABLE table_48808 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What place in the United States having a score of 67-75-68=210?
SELECT "Place" FROM table_48808 WHERE "Country" = 'united states' AND "Score" = '67-75-68=210'
wikisql
CREATE TABLE table_name_23 ( tournament VARCHAR, date VARCHAR )
Which Tournament was on the Date 6 Sep 2009?
SELECT tournament FROM table_name_23 WHERE date = "6 sep 2009"
sql_create_context
CREATE TABLE table_24302700_6 ( event_2_truck_pull VARCHAR, event_4_fingals_fingers VARCHAR )
What is the score in the 2 truck pull of the player who got 1 (5 in 33.84s) in the 4 fingals fingers?
SELECT event_2_truck_pull FROM table_24302700_6 WHERE event_4_fingals_fingers = "1 (5 in 33.84s)"
sql_create_context
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, visualize the relationship between code and code , and group by attribute founder.
SELECT T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
nvbench
CREATE TABLE table_name_62 ( country VARCHAR, player VARCHAR )
Which Country has a Player of jodie mudd?
SELECT country FROM table_name_62 WHERE player = "jodie mudd"
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...
按照医院1715411的诊断患者入院时的疾病名称,把患不同疾病的患者的平均年龄列出来是啥样的?
SELECT qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '1715411' GROUP BY qtb.IN_DIAG_DIS_NM UNION SELECT gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '1715411' GROUP BY gyb.IN_DIAG_DIS_NM UNION SELECT zyb.IN_DIAG_DIS_NM, AVG(zyb.PERSON_AGE) FROM zyb WHERE zyb....
css
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Comments ( Id number, PostId number, ...
Search for posts with specific tag.
SELECT Id, PostTypeId, AcceptedAnswerId, CreationDate, Score, ViewCount, OwnerUserId, Title, Tags, AnswerCount, CommentCount, FavoriteCount, Body FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%<abap>%'
sede
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 maximum age of patients whose language is engl and primary disease is morbid obesity/sda?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.language = "ENGL" AND demographic.diagnosis = "MORBID OBESITY/SDA"
mimicsql_data
CREATE TABLE table_name_16 ( crowd VARCHAR, away_team VARCHAR )
What is the crowd for away team of north melbourne?
SELECT crowd FROM table_name_16 WHERE away_team = "north melbourne"
sql_create_context
CREATE TABLE table_63722 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What was the date of the game for the Wrexham away team?
SELECT "Date" FROM table_63722 WHERE "Away team" = 'wrexham'
wikisql
CREATE TABLE table_57934 ( "Pick" real, "Round" real, "Player" text, "Position" text, "School" text )
How many rounds were there an offensive tackle position?
SELECT COUNT("Round") FROM table_57934 WHERE "Position" = 'offensive tackle'
wikisql
CREATE TABLE table_name_5 ( theme VARCHAR, order__number VARCHAR )
Which Theme has a Order # of 9?
SELECT theme FROM table_name_5 WHERE order__number = "9"
sql_create_context
CREATE TABLE countries ( country_id text, country_name text, region_id number ) CREATE TABLE jobs ( job_id text, job_title text, min_salary number, max_salary number ) CREATE TABLE job_history ( employee_id number, start_date time, end_date time, job_id text, department...
What are the employee ids of employees who report to Payam, and what are their salaries?
SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')
spider
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
7734587号医院的42244科室在04年2月19号到21年8月21号期间不是其负责的所有医疗就诊记录哪些?
SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '7734587' AND gwyjzb.IN_HOSP_DATE BETWEEN '2004-02-19' AND '2021-08-21' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '7734587' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2004-02-19' AND '2021-08-21' EXCEPT SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '773458...
css
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 ...
列出在2002-10-26到2004-11-22内医院0049779开出的检验报告单中,不同检测指标结果定量单位以及不同检测指标名称下,检测指标结果定量的是多大平均值,保留平均值最大的9项?
SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '0049779' AND BGRQ BETWEEN '2002-10-26' AND '2004-11-22' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) DESC LIMIT 9
css
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number...
users with Close vote priviledge, active in last month.
SELECT Id, Reputation, LastAccessDate FROM Users WHERE Reputation >= 3000 AND LastAccessDate >= DATEADD(dd, -30, GETDATE())
sede
CREATE TABLE table_21197135_1 ( opponent VARCHAR, record VARCHAR )
How many opponents were there when the record was 6-0?
SELECT COUNT(opponent) FROM table_21197135_1 WHERE record = "6-0"
sql_create_context
CREATE TABLE table_name_68 ( film VARCHAR, role VARCHAR )
Which film has a role named Taylor?
SELECT film FROM table_name_68 WHERE role = "taylor"
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 diagnosis short title is 31-32 completed weeks gestation and urine as the lab test fluid
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 = "31-32 comp wks gestation" AND lab.fluid = "Urine"
mimicsql_data
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperio...
how many nss infusion prescriptions have been given in 2101?
SELECT COUNT(*) FROM medication WHERE medication.drugname = 'nss infusion' AND STRFTIME('%y', medication.drugstarttime) = '2101'
eicu
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE chartevents ( row_id number, subject_id number, h...
calculate four year survival probability of patients who were prescribed prasugrel after having been diagnosed with klebsiella pneumoniae?
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 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 hz_info_mzjzjlb ( JZLSH number, ...
在74453436990门诊就诊的患者的卡号及卡类型是什么
SELECT mzjzjlb.KH, mzjzjlb.KLX FROM mzjzjlb WHERE mzjzjlb.JZLSH = '74453436990'
css
CREATE TABLE table_71195 ( "Round" real, "Name" text, "Position" text, "School" text, "Signed" text )
What round drafted was the 1b and a Signed of no cardinals - 1969 june?
SELECT COUNT("Round") FROM table_71195 WHERE "Position" = '1b' AND "Signed" = 'no cardinals - 1969 june'
wikisql
CREATE TABLE table_50954 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
How many to par in England?
SELECT "To par" FROM table_50954 WHERE "Country" = 'england'
wikisql
CREATE TABLE table_24172157_3 ( table VARCHAR, team VARCHAR )
What is the table for the team Blackburn Rovers?
SELECT table FROM table_24172157_3 WHERE team = "Blackburn Rovers"
sql_create_context
CREATE TABLE ftxmzjzjlb ( 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, MZZYZD...
自两千年五月八日起,截止到二零一五年九月十日,医院9045079在门诊就诊中开了11张以上的检验报告单的科室有多少
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM txmzjzjlb JOIN jybgb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE txmzjzjlb.YLJGDM = '9045079' AND jybgb.BGRQ BETWEEN '2000-05-08' AND '2015-09-10' GROUP BY jybgb.KSBM HAVING COUNT(*) >= 11 UNION SELECT jybgb.KSBM FROM ftxmzjzjlb...
css
CREATE TABLE staff ( staff_id number, staff_address_id number, nickname text, first_name text, middle_name text, last_name text, date_of_birth time, date_joined_staff time, date_left_staff time ) CREATE TABLE addresses ( address_id number, line_1_number_building text, ci...
What are the email addresses and date of births for all customers who have a first name of Carole?
SELECT email_address, date_of_birth FROM customers WHERE first_name = "Carole"
spider
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...
从06年7月5日至10年1月3日之间科室4735的住院量有那些?
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.JZKSDM = '4735' AND wdmzjzjlb.RYDJSJ BETWEEN '2006-07-05' AND '2010-01-03' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.JZKSDM = '4735' AND bdmzjzjlb.RYDJSJ BETWEEN '2006-07-05' AND '2010-01-03'
css
CREATE TABLE table_48895 ( "Name" text, "Built" text, "Listed" text, "Location" text, "County" text )
On what date was the bridge located in McClain listed?
SELECT "Listed" FROM table_48895 WHERE "Location" = 'mcclain'
wikisql
CREATE TABLE table_11677100_15 ( hometown VARCHAR, position VARCHAR )
How many hometowns does the catcher have?
SELECT COUNT(hometown) FROM table_11677100_15 WHERE position = "Catcher"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid numb...
has patient 027-178044 been in this year diagnosed with pneumonia?
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-178044')) AND diagnosis.diagnosisname = 'pneumonia' AND DATETIME(diagnos...
eicu
CREATE TABLE table_name_39 ( points INTEGER, equipment VARCHAR, position VARCHAR )
What is the sum of Points, when Equipment was 'Zabel-BSU', and when Position was 42?
SELECT SUM(points) FROM table_name_39 WHERE equipment = "zabel-bsu" AND position = 42
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
查询花英勋病患的检验报告单中结果指标均异常的检验报告单,需要检验报告的单号
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ...
css
CREATE TABLE table_name_15 ( lost INTEGER, drawn VARCHAR, team VARCHAR )
WHAT IS THE LOST WITH A DRAWN 11, FOR LEEK TOWN?
SELECT MAX(lost) FROM table_name_15 WHERE drawn = 11 AND team = "leek town"
sql_create_context
CREATE TABLE table_name_55 ( drawn VARCHAR, difference VARCHAR, points VARCHAR )
How many Drawn have a Difference of 3, and Points smaller than 52?
SELECT COUNT(drawn) FROM table_name_55 WHERE difference = "3" AND points < 52
sql_create_context
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program ( program_id int, name varchar, college varc...
If I take 254 and 125 , can I leave for work at 5:00 every day ?
SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE (course.number = 254 OR course.number = 125) AND course_offering.end_time > '17:00:00' AND semester.semester = 'WN' AND semester.year = ...
advising
CREATE TABLE table_203_88 ( id number, "language" text, "number" number, "percentage (%)" number, "males" number, "females" number )
number of male russian speakers
SELECT "males" FROM table_203_88 WHERE "language" = 'russian'
squall
CREATE TABLE table_name_15 ( second_member VARCHAR, first_member VARCHAR, first_party VARCHAR, year VARCHAR )
Who is the second member ewarlier than 1804 when Tory Henry Isherwood is the first member?
SELECT second_member FROM table_name_15 WHERE first_party = "tory" AND year < 1804 AND first_member = "henry isherwood"
sql_create_context
CREATE TABLE table_73655 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Original air date" text )
Who directed the episode 'Point Blank'?
SELECT "Directed by" FROM table_73655 WHERE "Title" = 'Point Blank'
wikisql
CREATE TABLE table_216 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text )
What is the report for the race i sunday mirror trophy?
SELECT "Report" FROM table_216 WHERE "Race Name" = 'I Sunday Mirror Trophy'
wikisql
CREATE TABLE table_2816 ( "Month" text, "Week" real, "Overall" text, "Offensive" text, "Defensive" text, "Transition" text, "Rookie" text )
Name the overall for mark steenhuis
SELECT "Overall" FROM table_2816 WHERE "Offensive" = 'Mark Steenhuis'
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 mzjybgb ( BBCJBW text, BBDM t...
哪些人在46775344496的医疗就诊中报告检验报告单是超过10份的?列出这些报告人的工号,还有姓名也列出来
SELECT zyjybgb.BGRGH, zyjybgb.BGRXM FROM zyjybgb WHERE zyjybgb.JZLSH = '46775344496' GROUP BY zyjybgb.BGRGH HAVING COUNT(*) > 10 UNION SELECT mzjybgb.BGRGH, mzjybgb.BGRXM FROM mzjybgb WHERE mzjybgb.JZLSH = '46775344496' GROUP BY mzjybgb.BGRGH HAVING COUNT(*) > 10
css
CREATE TABLE table_204_26 ( id number, "name" text, "position" text, "birth date/age at start of campaign" text, "games in campaign" text, "club" text )
who was the oldest player ?
SELECT "name" FROM table_204_26 ORDER BY "birth date/age at start of campaign" DESC LIMIT 1
squall
CREATE TABLE table_64688 ( "Team #1" text, "Agg." text, "Team #2" text, "1st leg" text, "2nd leg" text )
What is the first team when the 2nd leg is 100-113?
SELECT "Team #1" FROM table_64688 WHERE "2nd leg" = '100-113'
wikisql
CREATE TABLE table_26238 ( "Rank by Average" real, "Place" real, "Couple" text, "Total Points Earned" real, "Number of Dances" real, "Average" text )
How many total points were earned from the couple that averaged 29.0 points?
SELECT MAX("Total Points Earned") FROM table_26238 WHERE "Average" = '29.0'
wikisql
CREATE TABLE table_name_3 ( games VARCHAR, team VARCHAR )
How many Games for the player with Rebounds from Efes Pilsen?
SELECT games FROM table_name_3 WHERE team = "efes pilsen"
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospit...
tell me the amount of p.o. patient 031-24460 had received since 1599 days ago?
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-24460')) AND intakeoutput.celllabel = 'p.o.'...
eicu
CREATE TABLE table_204_12 ( id number, "area served" text, "city of license" text, "vc" number, "rf" number, "callsign" text, "network" text, "notes" text )
what is the number of stations serving terre haute ?
SELECT COUNT(*) FROM table_204_12 WHERE "city of license" = 'terre haute'
squall
CREATE TABLE table_44508 ( "Year" text, "Supplier" text, "Chest" text, "Sleeves" text, "Back" text )
Which Back has a Supplier of Kooga and a Year of 2006-2008?
SELECT "Back" FROM table_44508 WHERE "Supplier" = 'kooga' AND "Year" = '2006-2008'
wikisql
CREATE TABLE table_51997 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Who was the home team at Kardinia Park?
SELECT "Home team" FROM table_51997 WHERE "Venue" = 'kardinia park'
wikisql
CREATE TABLE table_29273390_1 ( directed_by VARCHAR, us_viewers__million_ VARCHAR )
Who directed an episode with 1.19 million?
SELECT directed_by FROM table_29273390_1 WHERE us_viewers__million_ = "1.19"
sql_create_context
CREATE TABLE table_29305 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text )
Which manager was appointed on 08.06.2010?
SELECT "Replaced by" FROM table_29305 WHERE "Date of appointment" = '08.06.2010'
wikisql
CREATE TABLE table_name_76 ( award VARCHAR, result VARCHAR, year VARCHAR )
What award was nominated in 2007?
SELECT award FROM table_name_76 WHERE result = "nominated" AND year = 2007
sql_create_context
CREATE TABLE table_55898 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
What is the record of the game on May 30?
SELECT "Record" FROM table_55898 WHERE "Date" = 'may 30'
wikisql
CREATE TABLE Faculty ( fname VARCHAR, lname VARCHAR, FacID VARCHAR, facID VARCHAR ) CREATE TABLE Faculty_participates_in ( facID VARCHAR )
Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in.
SELECT T1.fname, T1.lname, COUNT(*), T1.facID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.facID
sql_create_context
CREATE TABLE table_name_99 ( party VARCHAR, class VARCHAR, state VARCHAR )
What party is class 1 in wisconsin?
SELECT party FROM table_name_99 WHERE class = 1 AND state = "wisconsin"
sql_create_context
CREATE TABLE table_name_74 ( result VARCHAR, opponent VARCHAR )
What was the result when Dundee was the opponent?
SELECT result FROM table_name_74 WHERE opponent = "dundee"
sql_create_context
CREATE TABLE table_76013 ( "Publication" text, "Country" text, "Accolade" text, "Year" real, "Rank" text )
Which rank's country is the US when the accolade is 40 best albums of the year?
SELECT "Rank" FROM table_76013 WHERE "Country" = 'us' AND "Accolade" = '40 best albums of the year'
wikisql