table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE table_name_14 ( events INTEGER, cuts_made VARCHAR, top_25 VARCHAR )
What is the lowest events that have 17 as the cuts made, with a top-25 less than 8?
SELECT MIN(events) FROM table_name_14 WHERE cuts_made = 17 AND top_25 < 8
CREATE TABLE table_15875 ( "Player" text, "No." text, "Nationality" text, "Position" text, "Years in Toronto" text, "School/Club Team" text )
During which years was Marcus Banks in Toronto?
SELECT "Years in Toronto" FROM table_15875 WHERE "Player" = 'Marcus Banks'
CREATE TABLE table_name_85 ( t_papadopoulos VARCHAR, i_kasoulidis VARCHAR )
What was the percentage for T. Papadopoulos when I. Kasoulidis was 27.1%?
SELECT t_papadopoulos FROM table_name_85 WHERE i_kasoulidis = "27.1%"
CREATE TABLE table_2114238_1 ( archive VARCHAR, run_time VARCHAR )
Which archive has a run time of 23:48?
SELECT archive FROM table_2114238_1 WHERE run_time = "23:48"
CREATE TABLE table_name_20 ( year_made VARCHAR, manufacturer VARCHAR )
what is the year made when the manufacturer is 2-6-2 oooo mogul?
SELECT year_made FROM table_name_20 WHERE manufacturer = "2-6-2 — oooo — mogul"
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...
what is ethnicity of subject id 18351?
SELECT demographic.ethnicity FROM demographic WHERE demographic.subject_id = "18351"
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 demographic ( subject_id text, hadm_id t...
what is minimum days of hospital stay of patients whose primary disease is colangitis?
SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "COLANGITIS"
CREATE TABLE table_16076 ( "Round" real, "Choice" real, "Overall" real, "Player name" text, "Position" text, "College" text )
Where does the defensive back position appear first?
SELECT MIN("Round") FROM table_16076 WHERE "Position" = 'Defensive Back'
CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE professor ( emp_num number, dept_code text, prof_office text, prof_extension text, prof_high_degree text ) CREATE TABLE employee...
How many professors attained either Ph.D. or Masters degrees?
SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'
CREATE TABLE table_name_74 ( points VARCHAR, year VARCHAR, entrant VARCHAR, chassis VARCHAR )
What is the number of points for the Entrant of wolfgang seidel and a Cooper t45 chassis later than 1960?
SELECT COUNT(points) FROM table_name_74 WHERE entrant = "wolfgang seidel" AND chassis = "cooper t45" AND year > 1960
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE pat...
how many patients had docusate sodium (liquid) prescriptions in the same hospital visit after being diagnosed with chf nos, the previous year?
SELECT COUNT(DISTINCT t1.subject_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 FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title =...
CREATE TABLE table_24334163_1 ( Winners INTEGER, total_money_won VARCHAR )
What is the highest amount of group legs won when the prize money was 21,850?
SELECT MAX(Winners) AS group_legs_won FROM table_24334163_1 WHERE total_money_won = "£21,850"
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
james sloan has been diagnosed for what disease?
SELECT diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "James Sloan"
CREATE TABLE table_16506 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position" text )
Which team has the outgoing manager John Meyler?
SELECT "Team" FROM table_16506 WHERE "Outgoing manager" = 'John Meyler'
CREATE TABLE table_name_13 ( visitor VARCHAR, date VARCHAR )
What is Visitor, when Date is 'May 9'?
SELECT visitor FROM table_name_13 WHERE date = "may 9"
CREATE TABLE table_name_67 ( team__number2 VARCHAR )
what is the 2nd leg when team #2 is algiris kaunas?
SELECT 2 AS nd_leg FROM table_name_67 WHERE team__number2 = "žalgiris kaunas"
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...
VTC: strong hint of cross-post.
SELECT Id AS "post_link", Title FROM Posts WHERE Body LIKE '%down vote favorite%'
CREATE TABLE table_name_42 ( record VARCHAR, score VARCHAR )
What was the record at the game with a score of 7 5?
SELECT record FROM table_name_42 WHERE score = "7–5"
CREATE TABLE table_60072 ( "Players" text, "Position" text, "Year" text, "Ht/Wt" text, "Bats/Throws" text, "Hometown (Last School)" text )
What is Jake Johnson's position?
SELECT "Position" FROM table_60072 WHERE "Players" = 'jake johnson'
CREATE TABLE table_25429986_1 ( horse VARCHAR, position VARCHAR )
what horse is in the 6th position?
SELECT horse FROM table_25429986_1 WHERE position = "6th"
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE T...
Q:A ratio for recent users.
SELECT Id AS "user_link", LastAccessDate, CASE ANSWERS WHEN 0 THEN 'infinity' ELSE CAST(ROUND(QUESTIONS / CAST(ANSWERS AS FLOAT), 2) AS TEXT) END AS "Q:A ratio" FROM (SELECT u.Id, u.LastAccessDate, SUM(CASE p.PostTypeId WHEN 1 THEN 1 ELSE 0 END) AS "Questions", SUM(CASE p.PostTypeId WHEN 2 THEN 1 ELSE 0 END) AS "Answer...
CREATE TABLE table_name_31 ( frequency INTEGER, webcast VARCHAR, callsign VARCHAR )
Which Frequency has a Webcast of , and a Callsign of xemr?
SELECT AVG(frequency) FROM table_name_31 WHERE webcast = "•" AND callsign = "xemr"
CREATE TABLE table_72908 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text )
What is the part 4 of the word with the part 1 'heizan'?
SELECT "Part 4" FROM table_72908 WHERE "Part 1" = 'heizan'
CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP_DOB datetime ) CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CR...
Visualize a bar chart for how many hours do the students spend studying in each department?, and could you display by the bar in ascending?
SELECT DEPT_CODE, SUM(STU_HRS) FROM STUDENT GROUP BY DEPT_CODE ORDER BY DEPT_CODE
CREATE TABLE table_57194 ( "Rank" real, "Constituency" text, "Winning party 2007" text, "Swing to gain" real, "Labour's place 2007" text, "Result" text )
What was the result of rank 1?
SELECT "Result" FROM table_57194 WHERE "Rank" = '1'
CREATE TABLE table_train_21 ( "id" int, "pregnancy_or_lactation" bool, "severe_sepsis" bool, "systolic_blood_pressure_sbp" int, "active_infection" bool, "limited_care" bool, "septic_shock" bool, "coagulopathy" bool, "age" float, "lactate" int, "NOUSE" float )
this will include patients that have 2 / 4 systemic inflammatory response syndrome criteria, a suspected infection and either a initial serum lactate > 4 mmol / l or a initial systolic blood pressure < 90 millimeters of mercury.
SELECT * FROM table_train_21 WHERE active_infection = 1 AND (lactate > 4 OR systolic_blood_pressure_sbp < 90)
CREATE TABLE table_name_64 ( player VARCHAR, mls_team VARCHAR )
Tell me the player from dallas burn
SELECT player FROM table_name_64 WHERE mls_team = "dallas burn"
CREATE TABLE table_56703 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog #" text )
What is the label for the album with a catalog number of 83061-2?
SELECT "Label" FROM table_56703 WHERE "Catalog #" = '83061-2'
CREATE TABLE table_42266 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text )
What is the highest Year, when the Venue is Beijing, PR China?
SELECT MAX("Year") FROM table_42266 WHERE "Venue" = 'beijing, pr china'
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 prescriptions...
mention the admission type and death status of the patient with patient id 2560.
SELECT demographic.admission_type, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "2560"
CREATE TABLE faculty ( facid number, lname text, fname text, rank text, sex text, phone number, room text, building text ) CREATE TABLE activity ( actid number, activity_name text ) CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABLE partic...
What is the total number of faculty members?
SELECT COUNT(*) FROM faculty
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, show me about the distribution of name and code , and group by attribute headquarter in a bar chart, could you show bar from high to low order please?
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
Find the total revenue of companies of each founder Visualize by bar chart, and display bars in asc order.
SELECT Founder, SUM(Revenue) FROM Manufacturers GROUP BY Founder ORDER BY Founder
CREATE TABLE party ( Party_ID int, Minister text, Took_office text, Left_office text, Region_ID int, Party_name text ) CREATE TABLE party_events ( Event_ID int, Event_Name text, Party_ID int, Member_in_charge_ID int ) CREATE TABLE region ( Region_ID int, Region_name tex...
How many parties of the time they leave office, binning the leave office into WEEKDAY interval, show by the y-axis in ascending.
SELECT Left_office, COUNT(Left_office) FROM party ORDER BY COUNT(Left_office)
CREATE TABLE table_80369 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real, "Scorers" text )
What venue was on 27 May 2000?
SELECT "Venue" FROM table_80369 WHERE "Date" = '27 may 2000'
CREATE TABLE table_203_393 ( id number, "year" number, "film" text, "director" text, "cast" text, "details" text )
which film won the most awards ?
SELECT "film" FROM table_203_393 ORDER BY "details" DESC LIMIT 1
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 ) ...
Among patients admitted before 2156, how many of them had icd9 code 9744?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2156" AND procedures.icd9_code = "9744"
CREATE TABLE table_2546 ( "High School" text, "Type" text, "Established" real, "Enrollment" real, "Mascot" text, "WIAA Classification" text )
how many wiaa classifications does fort vancouver high school have?
SELECT COUNT("WIAA Classification") FROM table_2546 WHERE "High School" = 'Fort Vancouver'
CREATE TABLE table_name_53 ( venue VARCHAR, home_team VARCHAR )
If the home team was footscray which venue did they play it?
SELECT venue FROM table_name_53 WHERE home_team = "footscray"
CREATE TABLE table_name_33 ( starts INTEGER, cuts_made VARCHAR, top_10 VARCHAR )
What is the average number of starts when 11 cuts were made and the top 10 ranking is larger than 4?
SELECT AVG(starts) FROM table_name_33 WHERE cuts_made = 11 AND top_10 > 4
CREATE TABLE table_41622 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
What is the IATA for Benghazi, Libya?
SELECT "IATA" FROM table_41622 WHERE "Country" = 'libya' AND "City" = 'benghazi'
CREATE TABLE table_7413 ( "Tournament" text, "1995" text, "1996" text, "1997" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text )
In the Hamburg Masters Tournament, during which Ji Nov k was absent(A) in 1996, how did he do in 2003?
SELECT "2003" FROM table_7413 WHERE "1996" = 'a' AND "Tournament" = 'hamburg masters'
CREATE TABLE table_name_94 ( result VARCHAR, time___et__ VARCHAR, location VARCHAR )
What is the result of the game at the Shea Stadium at 12:30pm (ET)?
SELECT result FROM table_name_94 WHERE time___et__ = "12:30pm" AND location = "shea stadium"
CREATE TABLE table_61255 ( "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals Scored" real, "Goals Conceded" real, "Points" text )
Count the Draw which has Lost of 0, and a Goals Scored larger than 0?
SELECT SUM("Draw") FROM table_61255 WHERE "Lost" = '0' AND "Goals Scored" > '0'
CREATE TABLE table_name_29 ( date VARCHAR, score VARCHAR )
When did the score of 2-0 take place?
SELECT date FROM table_name_29 WHERE score = "2-0"
CREATE TABLE table_35437 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Last match" text, "Replaced by" text )
What is the last match with a vacancy date of round 2 and Ney Franco as outgoing manager?
SELECT "Last match" FROM table_35437 WHERE "Date of vacancy" = 'round 2' AND "Outgoing manager" = 'ney franco'
CREATE TABLE table_name_48 ( name VARCHAR, out_of VARCHAR, source VARCHAR, rank VARCHAR )
Which Name had the Source, World Bank, and a Rank smaller than 110, Out of a number smaller than 199?
SELECT name FROM table_name_48 WHERE source = "world bank" AND rank < 110 AND out_of < 199
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requi...
Is 441 being taught by Prof. Domenic Desocio next Winter ?
SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 441 AND instructor.name LIKE '%Domenic Desocio%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering...
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...
provide the number of patients whose ethnicity is american indian/alaska native and lab test name is d-dimer?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND lab.label = "D-Dimer"
CREATE TABLE table_9191 ( "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
What type of surface was played on July 27, 2013?
SELECT "Surface" FROM table_9191 WHERE "Date" = 'july 27, 2013'
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text )...
Total Posts, Comments, Answers by Week for Bigcommerce tag.
SELECT DISTINCT (p.Id) FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON pt.TagId = t.Id INNER JOIN Comments AS c ON c.PostId = p.Id WHERE t.TagName LIKE '%bigcommerce%' AND p.CreationDate >= '2019-01-01'
CREATE TABLE table_12350 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
On what date was the score 6 4?
SELECT "Date" FROM table_12350 WHERE "Score" = '6–4'
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
count the number of patients who have been prescribed the nitroglycerin sl this year.
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'nitroglycerin sl' AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'))
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, Cr...
Users with at least number of downvotes on a site.
SELECT Id AS "user_link", DownVotes FROM Users WHERE DownVotes >= '##minvotes##' AND Id > -1 ORDER BY DownVotes DESC
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
during the previous year what were the top three most frequent diagnoses that patients were diagnosed with within the same hospital visit after being diagnosed with cardiac arrest - witnessed, < 15 minutes cpr?
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cardi...
CREATE TABLE table_55962 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
Name the least attendance with carolina visitor
SELECT MIN("Attendance") FROM table_55962 WHERE "Visitor" = 'carolina'
CREATE TABLE table_55937 ( "Rank" real, "Name" text, "Nation" text, "Placings" text, "Total" real )
What is the sum of all total values for Switzerland?
SELECT SUM("Total") FROM table_55937 WHERE "Nation" = 'switzerland'
CREATE TABLE table_30133_3 ( gdp_as_of_2012_after_purchasing_power_parity__ppp__calculations__usd_billions_ VARCHAR )
What is the 1985 value for the year when GDP as of 2012 after PPP was 369.38?
SELECT 1985 FROM table_30133_3 WHERE gdp_as_of_2012_after_purchasing_power_parity__ppp__calculations__usd_billions_ = "369.38"
CREATE TABLE table_name_65 ( engine_configuration_ VARCHAR, _notes_0_100km_h VARCHAR, model VARCHAR )
What is the engine configuration & notes 0-100km/h with a model with 2.3 t5?
SELECT engine_configuration_ & _notes_0_100km_h FROM table_name_65 WHERE model = "2.3 t5"
CREATE TABLE table_34787 ( "Pick #" text, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
To which college/junior/club team did the player that was Pick 12 belong?
SELECT "College/junior/club team" FROM table_34787 WHERE "Pick #" = '12'
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, ...
Provide me the list of patients less than 79 years of age who have stayed in the hospital for more than 27 days.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "79" AND demographic.days_stay > "27"
CREATE TABLE table_name_89 ( population_estimate_2005 INTEGER, area__km_2__ VARCHAR )
what is the population estimate 2005 for the with the area (km2) 3,034.08?
SELECT AVG(population_estimate_2005) FROM table_name_89 WHERE area__km_2__ = 3 OFFSET 034.08
CREATE TABLE table_75601 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text )
Frequency MHz of 88.7 had what average erp w?
SELECT AVG("ERP W") FROM table_75601 WHERE "Frequency MHz" = '88.7'
CREATE TABLE table_train_49 ( "id" int, "consent" bool, "palliative_treatment" bool, "acute_mesenteric_ischemia" bool, "receiving_vasopressor" bool, "septic_shock" bool, "NOUSE" float )
present or suspected acute mesenteric ischemia
SELECT * FROM table_train_49 WHERE acute_mesenteric_ischemia = 1
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
Return a bar chart about the distribution of All_Games and ACC_Percent , and could you show in desc by the X-axis?
SELECT All_Games, ACC_Percent FROM basketball_match ORDER BY All_Games DESC
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 dead/expired patients have been discharged and had undergone the lab test manual reticulocyte count?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.discharge_location = "DEAD/EXPIRED" AND lab.label = "Reticulocyte Count, Manual"
CREATE TABLE table_34617 ( "Region served" text, "City" text, "Channels ( Analog / Digital )" text, "First air date" text, "ERP (Analog/ Digital)" text, "HAAT (Analog/ Digital) 1" text, "Transmitter Location" text )
Which Region served has of 1176 m 1190 m HAAT (Analog/ Digital) 1?
SELECT "Region served" FROM table_34617 WHERE "HAAT (Analog/ Digital) 1" = '1176 m 1190 m'
CREATE TABLE table_name_24 ( round VARCHAR, position VARCHAR, signed VARCHAR )
What round drafted was the 1b and a Signed of no cardinals - 1969 june?
SELECT COUNT(round) FROM table_name_24 WHERE position = "1b" AND signed = "no cardinals - 1969 june"
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, ...
what are the top five most often ordered procedures?
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 5
CREATE TABLE table_70189 ( "Year" text, "Venue" text, "Winners" text, "Runner-up" text, "3rd place" text )
Who was the runner-up in 2004?
SELECT "Runner-up" FROM table_70189 WHERE "Year" = '2004'
CREATE TABLE table_204_78 ( id number, "no." number, "train no." text, "origin" text, "destination" text, "train name" text )
how many trains are going to trivandrum ?
SELECT COUNT("train name") FROM table_204_78 WHERE "destination" = 'trivandrum'
CREATE TABLE member ( Member_ID int, Member_Name text, Party_ID text, In_office text ) CREATE TABLE region ( Region_ID int, Region_name text, Date text, Label text, Format text, Catalogue text ) CREATE TABLE party ( Party_ID int, Minister text, Took_office text, ...
How many parties of the time they left office, binning the left office time into Year interval, and then split by the minister's name, I want to display in ascending by the Y.
SELECT Left_office, COUNT(Left_office) FROM party GROUP BY Minister ORDER BY COUNT(Left_office)
CREATE TABLE table_78261 ( "Athlete" text, "Event" text, "Snatch" real, "Clean & Jerk" real, "Total" real )
What is the total that had an event of +105 kg and clean & jerk less than 227.5?
SELECT COUNT("Total") FROM table_78261 WHERE "Event" = '+105 kg' AND "Clean & Jerk" < '227.5'
CREATE TABLE table_name_42 ( name VARCHAR, moving_from VARCHAR, type VARCHAR )
Who is moving from Treviso with a loan return?
SELECT name FROM table_name_42 WHERE moving_from = "treviso" AND type = "loan return"
CREATE TABLE table_65811 ( "Airing date" text, "English title (Chinese title)" text, "Number of episodes" real, "Genre" text, "Official website" text )
What's the airing date for the show with 62 episodes?
SELECT "Airing date" FROM table_65811 WHERE "Number of episodes" = '62'
CREATE TABLE table_18161217_2 ( cospar_id VARCHAR, estimated_operational_life VARCHAR, satellite VARCHAR )
What is the cospar ID of the Kosmos 2397 satellite, which has an operational life of 2 months?
SELECT cospar_id FROM table_18161217_2 WHERE estimated_operational_life = "2 months" AND satellite = "Kosmos 2397"
CREATE TABLE table_47406 ( "Nat." text, "Name" text, "Moving to" text, "Type" text, "Transfer window" text, "Transfer fee" text )
Which Type has a Name of edson ratinho?
SELECT "Type" FROM table_47406 WHERE "Name" = 'edson ratinho'
CREATE TABLE Assets ( asset_id INTEGER, maintenance_contract_id INTEGER, supplier_company_id INTEGER, asset_details VARCHAR(255), asset_make VARCHAR(20), asset_model VARCHAR(20), asset_acquired_date DATETIME, asset_disposed_date DATETIME, other_asset_details VARCHAR(255) ) CREATE TA...
Which parts have more than 2 faults? Show the part name and id in a bar chart, show by the y axis from low to high.
SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id ORDER BY T1.part_id
CREATE TABLE scientists ( ssn number, name text ) CREATE TABLE projects ( code text, name text, hours number ) CREATE TABLE assignedto ( scientist number, project text )
Find the name of scientists who are not assigned to any project.
SELECT name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM assignedto)
CREATE TABLE table_54149 ( "Year" real, "Artist" text, "Composition" text, "Mintage" real, "Issue Price" text )
What is the composition with an artist of Henry Purdy, a year smaller than 2002, and a mint more than 1,998?
SELECT "Composition" FROM table_54149 WHERE "Year" < '2002' AND "Mintage" > '1,998' AND "Artist" = 'henry purdy'
CREATE TABLE table_name_42 ( took_office INTEGER, left_office VARCHAR )
What is the Took Office Date of the Presidency that Left Office Incumbent?
SELECT SUM(took_office) FROM table_name_42 WHERE left_office = "incumbent"
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, ...
list flights from MINNEAPOLIS to PITTSBURGH on friday
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 = 'PITTSBURGH' AND date_day.day_number = 25 AND date_day.month_number = 6 AN...
CREATE TABLE table_53611 ( "Round" real, "Date" text, "Home Team" text, "Score" text, "Away Team" text, "Crowd" real, "Stadium" text, "Match Details" text )
Which home team played in front of 18,345 people in Adelaide Oval?
SELECT "Home Team" FROM table_53611 WHERE "Crowd" > '18,345' AND "Stadium" = 'adelaide oval'
CREATE TABLE table_name_58 ( pop_act VARCHAR, album VARCHAR )
Which act's album has a name of All That You Can't Leave Behind?
SELECT pop_act FROM table_name_58 WHERE album = "all that you can't leave behind"
CREATE TABLE manager_award_vote ( award_id TEXT, year INTEGER, league_id TEXT, player_id TEXT, points_won INTEGER, points_max INTEGER, votes_first INTEGER ) CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ...
Show the trend about the total average number of attendance at home games change over the years, bin year into year interval, and I want to list by the X in desc please.
SELECT year, AVG(attendance) FROM home_game GROUP BY year ORDER BY year DESC
CREATE TABLE table_name_24 ( rd__number VARCHAR, reg_gp VARCHAR, pick__number VARCHAR )
What is the rd number where the reg GP is 0 and the pick is 150?
SELECT COUNT(rd__number) FROM table_name_24 WHERE reg_gp = 0 AND pick__number = 150
CREATE TABLE table_44506 ( "Date" text, "Time" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Total" text )
Which Score has a Set 1 of 25 16?
SELECT "Score" FROM table_44506 WHERE "Set 1" = '25–16'
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 demographic ( subject_id text, hadm_id t...
get me the number of white ethnic background patients who were born before the year 2058.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.dob_year < "2058"
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId nu...
difficulty of various JS frameworks.
SELECT Tags.TagName FROM Tags AS tags JOIN PostTags AS postTags ON PostTags.TagId = Tags.Id JOIN Posts AS posts ON Posts.Id = PostTags.PostId WHERE Tags.TagName IN ('angularjs', 'angular2', 'vue.js', 'ember.js', 'backbone.js', 'reactjs', 'knockout.js', 'typescript') AND Posts.AcceptedAnswerId IS NULL
CREATE TABLE table_27296 ( "Freq" real, "Call" text, "City" text, "Owner" text, "Start" real, "Day Power ( W )" real, "Night Power" real, "Nickname" text, "Format" text, "Stereo" text )
Does the city of moline have stereo?
SELECT "Stereo" FROM table_27296 WHERE "City" = 'Moline'
CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments ...
If I take PHARMACY 426 , what classes will I be able to take ?
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.pre_course_id WHERE COURSE_1.department = 'PHARMACY' AND COURSE_1.num...
CREATE TABLE table_55094 ( "Title" text, "Year" real, "Country" text, "Music" text, "Uncut run time" text )
What music is in the film before 1962?
SELECT "Music" FROM table_55094 WHERE "Year" = '1962'
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 days of hospital stay and diagnoses icd9 code of subject name troy friedman?
SELECT demographic.days_stay, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Troy Friedman"
CREATE TABLE table_45022 ( "Antibody" text, "Brand name" text, "Approval date" real, "Type" text, "Target" text )
What's the target for the brand mylotarg?
SELECT "Target" FROM table_45022 WHERE "Brand name" = 'mylotarg'
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...
how much does it cost for nacl 0.9% bolus?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'nacl 0.9% bolus')
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,...
What is the drug type and drug name of METD5?
SELECT prescriptions.drug_type, prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "METD5"
CREATE TABLE users ( user_id number, role_code text, user_name text, user_login text, password text ) CREATE TABLE images ( image_id number, image_alt_text text, image_name text, image_url text ) CREATE TABLE document_sections_images ( section_id number, image_id number ) ...
Return the codes of the document types that do not have a total access count of over 10000.
SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
For those employees who do not work in departments with managers that have ids between 100 and 200, find job_id and employee_id , and visualize them by a bar chart, and display Y-axis in asc order.
SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID
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...
how many patients are diagnosed with hx surgery to organs nec and base drug type?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hx surgery to organs NEC" AND prescriptions.drug_type = "BASE"
CREATE TABLE school ( school_id number, school text, location text, enrollment number, founded number, denomination text, boys_or_girls text, day_or_boarding text, year_entered_competition number, school_colors text ) CREATE TABLE school_details ( school_id number, nickn...
List the enrollment for each school that does not have 'Catholic' as denomination.
SELECT enrollment FROM school WHERE denomination <> "Catholic"