instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What championships had a match where Natasha Zvereva played as partner? | CREATE TABLE table_27031 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Partner" text,"Opponent" text,"Score" text) | SELECT "Championship" FROM table_27031 WHERE "Partner" = 'Natasha Zvereva' |
who placed in the top spot ? | CREATE TABLE table_204_712 (id number,"rank" number,"athlete" text,"nationality" text,"time" text,"notes" text) | SELECT "athlete" FROM table_204_712 WHERE id = 1 |
What is the Total number of medals for the Nation with 7 or less Bronze medals and 1 Silver medal with a Rank of 9 or larger? | CREATE TABLE table_name_90 (total INTEGER,rank VARCHAR,bronze VARCHAR,silver VARCHAR) | SELECT MIN(total) FROM table_name_90 WHERE bronze < 7 AND silver = 1 AND rank > 9 |
What day did Footscray play as the home team? | CREATE TABLE table_name_20 (date VARCHAR,home_team VARCHAR) | SELECT date FROM table_name_20 WHERE home_team = "footscray" |
Is Winter the only time DENT 532 is offered ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comm... | 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.department = 'DENT' AND course.number = 532 AND semester.semester <> 'Winter' |
What was the finish for England? | CREATE TABLE table_60144 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Finish" FROM table_60144 WHERE "Country" = 'england' |
What home team has june 22 as the date? | CREATE TABLE table_name_87 (home_team VARCHAR,date VARCHAR) | SELECT home_team FROM table_name_87 WHERE date = "june 22" |
What is the pick number for Ray Giroux? | CREATE TABLE table_name_52 (pick VARCHAR,player VARCHAR) | SELECT pick FROM table_name_52 WHERE player = "ray giroux" |
seizure disorder, history of stroke, focal brain lesion, traumatic brain injury, substance abuse, malignancy. | CREATE TABLE table_train_128 ("id" int,"vascular" bool,"mania" bool,"pulmonary_disease" bool,"cardiac" bool,"stroke" bool,"substance_dependence" bool,"schizophrenia" bool,"cerebrovascular_disease" bool,"hematologic_disease" bool,"adverse_reactions_venlaflaxine" bool,"traumatic_brain_injury" bool,"focal_brain_lesion" bo... | SELECT * FROM table_train_128 WHERE seizure_disorder = 1 OR (stroke = 1 OR focal_brain_lesion = 1 OR traumatic_brain_injury = 1 OR substance_dependence = 1 OR malignancy = 1) |
What is every code name for the model Radeon HD 6650m? | CREATE TABLE table_73710 ("Model" text,"Launch" text,"Model Number" text,"Code name" text,"Fab (nm)" text,"Bus interface" text,"Memory (MiB)" text,"Core clock (MHz)" text,"Memory clock (MHz)" text,"Config core 1" text,"Pixel (GP /s)" text,"Texture (GT /s)" text,"Bandwidth (GB /s)" text,"Bus type" text,"Bus width (bit)"... | SELECT "Code name" FROM table_73710 WHERE "Model" = 'Radeon HD 6650M' |
Count of the positively scored, open questions with a positively scored, accepted answer, by month. | CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous ... | SELECT DATEFROMPARTS(TIME_TO_STR(Q.CreationDate, '%Y'), TIME_TO_STR(Q.CreationDate, '%M'), 1) AS Month, COUNT(*) AS Count FROM Posts AS Q, Posts AS A WHERE Q.AcceptedAnswerId = A.Id AND Q.CreationDate < @TsNow AND Q.ClosedDate IS NULL AND Q.Score > 0 AND A.Score > 0 GROUP BY DATEFROMPARTS(TIME_TO_STR(Q.CreationDate, '%... |
What is Set 1, when Set 2 is '21:18'? | CREATE TABLE table_name_48 (set_1 VARCHAR,set_2 VARCHAR) | SELECT set_1 FROM table_name_48 WHERE set_2 = "21:18" |
Tell me the year for class of 125cc | CREATE TABLE table_name_55 (year VARCHAR,class VARCHAR) | SELECT year FROM table_name_55 WHERE class = "125cc" |
Show me the total number by origin in a histogram | CREATE TABLE weekly_weather (station_id int,day_of_week text,high_temperature int,low_temperature int,precipitation real,wind_speed_mph int)CREATE TABLE train (id int,train_number int,name text,origin text,destination text,time text,interval text)CREATE TABLE route (train_id int,station_id int)CREATE TABLE station (id ... | SELECT origin, COUNT(*) FROM train GROUP BY origin |
What is the score of Player Tom Kite? | CREATE TABLE table_name_17 (score VARCHAR,player VARCHAR) | SELECT score FROM table_name_17 WHERE player = "tom kite" |
what number ofpatients with ventricular tachcardia had the year of death in or before the year 2111? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "VENTRICULAR TACHYCARDIA" AND demographic.dod_year <= "2111.0" |
A line chart for showing the number of the working years of managers in descending order of their level. | CREATE TABLE railway_manage (Railway_ID int,Manager_ID int,From_Year text)CREATE TABLE railway (Railway_ID int,Railway text,Builder text,Built text,Wheels text,Location text,ObjectNumber text)CREATE TABLE manager (Manager_ID int,Name text,Country text,Working_year_starts text,Age int,Level int)CREATE TABLE train (Train... | SELECT Working_year_starts, COUNT(Working_year_starts) FROM manager ORDER BY Level DESC |
What is the July temperature where plant hardiness zone is 2B and January figure is 12/ 23 c (10-9 f)? | CREATE TABLE table_name_32 (july VARCHAR,plant_hardiness_zone VARCHAR,january VARCHAR) | SELECT july FROM table_name_32 WHERE plant_hardiness_zone = "2b" AND january = "−12/−23°c (10-9°f)" |
Which Tries against have Points against larger than 109? | CREATE TABLE table_41016 ("Team" text,"Tries for" real,"Tries against" real,"Try diff" text,"Points for" real,"Points against" real,"Points diff" text) | SELECT MAX("Tries against") FROM table_41016 WHERE "Points against" > '109' |
Name the original airdate for guy verney | CREATE TABLE table_2237 ("No" real,"Season" real,"Ep" real,"Title" text,"Writer" text,"Director" text,"Original airdate" text,"Archive" text) | SELECT "Original airdate" FROM table_2237 WHERE "Director" = 'Guy Verney' |
What was the losing score on September 1? | CREATE TABLE table_55043 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text) | SELECT "Loss" FROM table_55043 WHERE "Date" = 'september 1' |
Marty Riessen played as a partner during a match with what kind of surface? | CREATE TABLE table_11043 ("Outcome" text,"Date" real,"Tournament" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text) | SELECT "Surface" FROM table_11043 WHERE "Partner" = 'marty riessen' |
What is the average attendance of the game where the home team was the Blues? | CREATE TABLE table_5322 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Attendance" real,"Record" text,"Points" real) | SELECT AVG("Attendance") FROM table_5322 WHERE "Home" = 'blues' |
calculate the number of people who died after being diagnosed with esoph varice oth dis nos within the same hospital visit since 1 year ago. | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,... | SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime, t1.hadm_id FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FRO... |
Name the drawn for tries for of 42 | CREATE TABLE table_68938 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text) | SELECT "Drawn" FROM table_68938 WHERE "Tries for" = '42' |
What is the Place of the Player with a Score of 73-67-74-71=285? | CREATE TABLE table_name_88 (place VARCHAR,score VARCHAR) | SELECT place FROM table_name_88 WHERE score = 73 - 67 - 74 - 71 = 285 |
provide the number of patients whose admission location is phys referral/normal deli and lab test item id is 51035. | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.itemid = "51035" |
Which tourist attractions can we get to by bus? Tell me the names of the attractions. | CREATE TABLE visitors (tourist_id number,tourist_details text)CREATE TABLE locations (location_id number,location_name text,address text,other_details text)CREATE TABLE staff (staff_id number,tourist_attraction_id number,name text,other_details text)CREATE TABLE features (feature_id number,feature_details text)CREATE T... | SELECT name FROM tourist_attractions WHERE how_to_get_there = "bus" |
Na,e the number of field goals for right tackle | CREATE TABLE table_19273 ("Player" text,"Position" text,"Starter" text,"Touchdowns" real,"Extra points" real,"Field goals" real,"Points" real) | SELECT COUNT("Field goals") FROM table_19273 WHERE "Position" = 'Right tackle' |
how many patients are diagnosed with icd9 code 44020 and tested under category hematology in lab? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita... | 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.icd9_code = "44020" AND lab."CATEGORY" = "Hematology" |
Find the state and country of all cities with post code starting with 4. | CREATE TABLE addresses (state_province_county VARCHAR,country VARCHAR,zip_postcode VARCHAR) | SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE "4%" |
What is the home country of the player who placed t5 and had a score of 69-71=140? | CREATE TABLE table_50172 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Country" FROM table_50172 WHERE "Place" = 't5' AND "Score" = '69-71=140' |
which year did they win their least amount of games ? | CREATE TABLE table_204_242 (id number,"season" text,"record" text,"finish" text,"manager" text,"notes" text) | SELECT "season" FROM table_204_242 ORDER BY "record" LIMIT 1 |
in 2103, what were the four most common input events? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid n... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND STRFTIME('%y', intakeoutput.intakeoutputtime) = '2103' GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 4 |
What is the lowest 1978 Veteran membership with less than 48,000 in sept. 1943, a late 1941 of vojvodina, and a late 1942 bigger than 1,000? | CREATE TABLE table_54189 ("! Late 1941" text,"Late 1942" real,"Sept. 1943" real,"Late 1943" real,"Late 1944" real,"1978 Veteran membership" real) | SELECT MIN("1978 Veteran membership") FROM table_54189 WHERE "Sept. 1943" < '48,000' AND "! Late 1941" = 'vojvodina' AND "Late 1942" > '1,000' |
give me the total amount of d10w that patient 31854 took on this month/29. | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number... | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... |
calculate the maximum days for which white ethnic background patients stayed in hospital. | 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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.ethnicity = "WHITE" |
Give me the number of patients less than 81 years who had an insertion of endotracheal tube procedure. | 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 text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "81" AND procedures.long_title = "Insertion of endotracheal tube" |
What was the location after 1934 that Philadelphia Eagles lost on October 15? | CREATE TABLE table_name_98 (location VARCHAR,date VARCHAR,year VARCHAR,loser VARCHAR) | SELECT location FROM table_name_98 WHERE year > 1934 AND loser = "philadelphia eagles" AND date = "october 15" |
What was the final score for the game at giants stadium when the indianapolis colts were the visiting team? | CREATE TABLE table_51363 ("Date" text,"Visiting Team" text,"Final Score" text,"Host Team" text,"Stadium" text) | SELECT "Final Score" FROM table_51363 WHERE "Visiting Team" = 'indianapolis colts' AND "Stadium" = 'giants stadium' |
What are the cyrillic and other names of the settlement whose population is 6591? | CREATE TABLE table_73823 ("Settlement" text,"Cyrillic Name Other Names" text,"Type" text,"Population (2011)" real,"Largest ethnic group (2002)" text,"Dominant religion (2002)" text) | SELECT "Cyrillic Name Other Names" FROM table_73823 WHERE "Population (2011)" = '6591' |
What Time/Retired has a Laps of 86 and the Team of HVM Racing? | CREATE TABLE table_34053 ("Driver" text,"Team" text,"Laps" real,"Time/Retired" text,"Grid" real,"Points" real) | SELECT "Time/Retired" FROM table_34053 WHERE "Laps" = '86' AND "Team" = 'hvm racing' |
Show names for all aircrafts with distances more than the average. | CREATE TABLE flight (flno number,origin text,destination text,distance number,departure_date time,arrival_date time,price number,aid number)CREATE TABLE aircraft (aid number,name text,distance number)CREATE TABLE employee (eid number,name text,salary number)CREATE TABLE certificate (eid number,aid number) | SELECT name FROM aircraft WHERE distance > (SELECT AVG(distance) FROM aircraft) |
What was the score on November 25? | CREATE TABLE table_13762472_3 (score VARCHAR,date VARCHAR) | SELECT score FROM table_13762472_3 WHERE date = "November 25" |
What is the lowest VIII Edition Gold with a Silver of 4? | CREATE TABLE table_68722 ("Year" text,"Edition" text,"Host city" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MIN("Gold") FROM table_68722 WHERE "Silver" = '4' AND "Edition" = 'viii' |
Find the sum of credits of courses that have more than one prerequisite for each title with a bar chart, sort sum credits in desc order please. | CREATE TABLE takes (ID varchar(5),course_id varchar(8),sec_id varchar(8),semester varchar(6),year numeric(4,0),grade varchar(2))CREATE TABLE classroom (building varchar(15),room_number varchar(7),capacity numeric(4,0))CREATE TABLE teaches (ID varchar(5),course_id varchar(8),sec_id varchar(8),semester varchar(6),year nu... | SELECT title, SUM(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY title ORDER BY SUM(credits) DESC |
Kinda newcomers with reputation and more than one post. | CREATE TABLE PostHistoryTypes (Id number,Name text)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 PostTags (PostId number,TagId number)CREATE TABLE PostNoticeTypes ... | SELECT OwnerUserId AS "user_id", COUNT(OwnerUserId) AS "number_of_posts" FROM Posts WHERE OwnerUserId IN (SELECT Id FROM Users WHERE Reputation < 1000 AND Reputation NOT IN (1, 101)) GROUP BY OwnerUserId HAVING COUNT(OwnerUserId) > 1 |
Namw the total number for domestic freight for international mail is larger than 1.0 with domestic mail for 260 | CREATE TABLE table_1754531_4 (domestic_freight VARCHAR,international_mail VARCHAR,domestic_mail VARCHAR) | SELECT COUNT(domestic_freight) FROM table_1754531_4 WHERE international_mail > 1.0 AND domestic_mail = 260 |
What is the total number of Rank with 100 goals, and less than 300 matches? | CREATE TABLE table_43329 ("Rank" real,"Name" text,"Years" text,"Matches" real,"Goals" real) | SELECT COUNT("Rank") FROM table_43329 WHERE "Goals" = '100' AND "Matches" < '300' |
What is the HDTV status of the r-light television service? | CREATE TABLE table_name_12 (hdtv VARCHAR,television_service VARCHAR) | SELECT hdtv FROM table_name_12 WHERE television_service = "r-light" |
Which athlete had a six month suspension from IIHF? | CREATE TABLE table_63333 ("Athlete" text,"Nation" text,"Olympics" real,"Substance" text,"Punishment" text) | SELECT "Athlete" FROM table_63333 WHERE "Punishment" = 'six month suspension from iihf' |
Which Venue is the one for the footscray Home team? | CREATE TABLE table_name_73 (venue VARCHAR,home_team VARCHAR) | SELECT venue FROM table_name_73 WHERE home_team = "footscray" |
What's the German Pluperfect when the Macedonian is /- /- ? | CREATE TABLE table_64658 ("English" text,"German" text,"Dutch" text,"Latin" text,"Romanian" text,"Portuguese" text,"Spanish" text,"Italian" text,"French" text,"Greek (Modern)" text,"Bulgarian" text,"Macedonian" text,"Polish (extinct)" text) | SELECT "German" FROM table_64658 WHERE "Macedonian" = 'беше слушнал/-а/-о' |
how many total points did ingrid kr mer score in the final ? | CREATE TABLE table_203_780 (id number,"rank" number,"diver" text,"preliminary\npoints" number,"preliminary\nrank" number,"final\npoints" number,"final\nrank" number,"final\ntotal" number) | SELECT "final\npoints" FROM table_203_780 WHERE "diver" = 'ingrid kramer' |
Return the result that is most frequent at music festivals. | CREATE TABLE music_festival (id number,music_festival text,date_of_ceremony text,category text,volume number,result text)CREATE TABLE volume (volume_id number,volume_issue text,issue_date text,weeks_on_top number,song text,artist_id number)CREATE TABLE artist (artist_id number,artist text,age number,famous_title text,f... | SELECT result FROM music_festival GROUP BY result ORDER BY COUNT(*) DESC LIMIT 1 |
what is the number of patients whose admission type is elective and drug type is additive? | 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 (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug_type = "ADDITIVE" |
count the number of patients who had undergone administration of electrolytes - intravenous two or more times until 3 years ago. | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,disch... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, COUNT(*) AS c1 FROM patient WHERE patient.patientunitstayid = (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'administration of electrolytes - intravenous' AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TI... |
what is patient 31306's yearly maximum white blood cells level since 41 months ago? | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,co... | SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31306) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'white blood cells') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_T... |
What is the Outcome when the partner was kristof vliegen? | CREATE TABLE table_name_20 (outcome VARCHAR,partner VARCHAR) | SELECT outcome FROM table_name_20 WHERE partner = "kristof vliegen" |
list the top five most frequent diagnoses that patients are diagnosed with within the same hospital visit after undergoing a coronar arteriogr-2 cath in 2105. | 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 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 ... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_i... |
Bar chart x axis occupation y axis the total number, and show in ascending by the bar. | CREATE TABLE match_result (Rank int,Club_ID int,Gold int,Big_Silver int,Small_Silver int,Bronze int,Points int)CREATE TABLE player (Player_ID int,Sponsor_name text,Player_name text,Gender text,Residence text,Occupation text,Votes int,Rank text)CREATE TABLE player_coach (Player_ID int,Coach_ID int,Starting_year int)CREA... | SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation ORDER BY Occupation |
Find meter_300 and ID , and visualize them by a bar chart. | CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text... | SELECT meter_300, ID FROM swimmer |
Show the average of account details for different statement details in a bar chart, and display the average of account details in descending order. | CREATE TABLE Ref_Document_Types (Document_Type_Code CHAR(15),Document_Type_Name VARCHAR(255),Document_Type_Description VARCHAR(255))CREATE TABLE Statements (Statement_ID INTEGER,Statement_Details VARCHAR(255))CREATE TABLE Ref_Budget_Codes (Budget_Type_Code CHAR(15),Budget_Type_Description VARCHAR(255))CREATE TABLE Docu... | SELECT Statement_Details, AVG(Account_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY AVG(Account_Details) DESC |
What was the date of elevation for the cardinal given the order and title of Cardinal-Priest of S. Pudenziana? | CREATE TABLE table_63623 ("Elector" text,"Nationality" text,"Cardinalatial order and title" text,"Elevated" text,"Elevator" text) | SELECT "Elevated" FROM table_63623 WHERE "Cardinalatial order and title" = 'cardinal-priest of s. pudenziana' |
Who was the HP winning team when the EP winning team was Hans Zereis and the GM winning team was Charles Gibson? | CREATE TABLE table_29225103_2 (hp_winning_team VARCHAR,ep_winning_team VARCHAR,gm_winning_team VARCHAR) | SELECT hp_winning_team FROM table_29225103_2 WHERE ep_winning_team = "Hans Zereis" AND gm_winning_team = "Charles Gibson" |
Top 1000 users of india and pakistan. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE PostT... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, LOWER(Location) AS CNTRY FROM Users WHERE LOWER(Location) IN ('india', 'pakistan') ORDER BY Reputation DESC LIMIT 10000 |
What was the Indians record during the game that had 19,823 fans attending? | CREATE TABLE table_74976 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text) | SELECT "Record" FROM table_74976 WHERE "Attendance" = '19,823' |
Against Opponent in the Final Ivan Lendl, on a Surface of clay, with an Outcome of runner-up, where was the Championship? | CREATE TABLE table_32970 ("Outcome" text,"Date" real,"Championship" text,"Surface" text,"Opponent in the final" text,"Score in the final" text) | SELECT "Championship" FROM table_32970 WHERE "Outcome" = 'runner-up' AND "Surface" = 'clay' AND "Opponent in the final" = 'ivan lendl' |
Show me the total number of the flag of ships that are not steered by any captain with Midshipman rank using a bar graph, and display x axis in descending order. | CREATE TABLE Ship (Ship_ID int,Name text,Type text,Built_Year real,Class text,Flag text)CREATE TABLE captain (Captain_ID int,Name text,Ship_ID int,age text,Class text,Rank text) | SELECT Flag, COUNT(Flag) FROM Ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM captain WHERE Rank = 'Midshipman') GROUP BY Flag ORDER BY Flag DESC |
What is the procedure short title of Paul Edwards? | 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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Paul Edwards" |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, and I want to show from low to high by the names. | CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE employees (EMPLOYEE_ID decimal(6,... | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID |
Bin the claim date into the Year interval and count them for visualizing a bar chart, and show in desc by the y-axis. | CREATE TABLE Customers (Customer_ID INTEGER,Customer_Details VARCHAR(255))CREATE TABLE Payments (Payment_ID INTEGER,Settlement_ID INTEGER,Payment_Method_Code VARCHAR(255),Date_Payment_Made DATE,Amount_Payment INTEGER)CREATE TABLE Customer_Policies (Policy_ID INTEGER,Customer_ID INTEGER,Policy_Type_Code CHAR(15),Start_D... | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Settlements ORDER BY COUNT(Date_Claim_Made) DESC |
Which candidate won 61.47% of the votes? | CREATE TABLE table_name_82 (candidate VARCHAR,share_of_votes VARCHAR) | SELECT candidate FROM table_name_82 WHERE share_of_votes = "61.47%" |
count the number of patients whose gender is f and admission type is emergency? | 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 text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.admission_type = "EMERGENCY" |
What is Player, when Country is 'United States', and when Place is '6'? | CREATE TABLE table_62603 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real) | SELECT "Player" FROM table_62603 WHERE "Country" = 'united states' AND "Place" = '6' |
alabama last put someone to death in 2013 what was its means of execution ? | CREATE TABLE table_203_9 (id number,"state" text,"last execution date" text,"name" text,"crime" text,"method" text) | SELECT "method" FROM table_203_9 WHERE "state" = 'alabama' |
Who won Division West when Division North was won by Alumina? | CREATE TABLE table_78583 ("Season" text,"Division North" text,"Division South" text,"Division East" text,"Division West" text,"Division Southwest" text) | SELECT "Division West" FROM table_78583 WHERE "Division North" = 'alumina' |
give me the number of patients whose admission year is less than 2114 and item id is 50806? | 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 text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2114" AND lab.itemid = "50806" |
What is the radio station branding when the power km is 5kw? | CREATE TABLE table_26389 ("Branding" text,"Callsign" text,"Frequency" text,"Power kW" text,"Coverage" text) | SELECT "Branding" FROM table_26389 WHERE "Power kW" = '5kW' |
Who was the home team of the game at the time of 15:00? | CREATE TABLE table_75901 ("Date" text,"Time" text,"Home" text,"Away" text,"Score" text,"Ground" text) | SELECT "Home" FROM table_75901 WHERE "Time" = '15:00' |
what is the number of patients whose primary disease is stemi and year of death is less than or equal to 2111? | 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 (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "STEMI" AND demographic.dod_year <= "2111.0" |
Who is the mInister who left office during 1960? | CREATE TABLE table_31570 ("Number" real,"Minister" text,"Took office" text,"Left office" text,"Government" text,"Party" text) | SELECT "Minister" FROM table_31570 WHERE "Left office" = '1960' |
when did patient 14397 get the d5w last time? | CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title tex... | SELECT inputevents_cv.charttime FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14397)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label... |
For an IATA of MLE, what is the ICAO? | CREATE TABLE table_34979 ("City" text,"Country" text,"IATA" text,"ICAO" text,"Airport" text) | SELECT "ICAO" FROM table_34979 WHERE "IATA" = 'mle' |
What is the Tie no when Crystal Palace is the Away team? | CREATE TABLE table_59123 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Tie no" FROM table_59123 WHERE "Away team" = 'crystal palace' |
Which race did Bill Holland win in 1946? | CREATE TABLE table_76543 ("Year" real,"Date" text,"Race name" text,"Winner" text,"Engine" text) | SELECT "Race name" FROM table_76543 WHERE "Year" = '1946' AND "Winner" = 'bill holland' |
what is minimum age of patients whose gender is f and age is greater than or equal to 27? | CREATE TABLE procedures (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,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.age >= "27" |
Next Winter is Prof. Simon Wojczyszyn teaching 445 ? | CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE ta (campus_job_id int,studen... | 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 = 445 AND instructor.name LIKE '%Simon Wojczyszyn%' AND offering_instructor.instructor_id = instructor.instructor_id AND offerin... |
what club is before saipa ? | CREATE TABLE table_204_99 (id number,"#" number,"club" text,"winner" number,"last win" number,"runner-up" number,"last losing final" number) | SELECT "club" FROM table_204_99 WHERE id = (SELECT id FROM table_204_99 WHERE "club" = 'saipa') - 1 |
What's the average year that sara orlesky and farhan lalji are the sideline reporters? | CREATE TABLE table_name_65 (year INTEGER,sideline_reporters VARCHAR) | SELECT AVG(year) FROM table_name_65 WHERE sideline_reporters = "sara orlesky and farhan lalji" |
Which co-singers appear in the movie Pyaasa? | CREATE TABLE table_2528382_2 (Co VARCHAR,singers VARCHAR,movie_album VARCHAR) | SELECT Co - singers FROM table_2528382_2 WHERE movie_album = "Pyaasa" |
What is the location of the kanyakumari government medical college? | CREATE TABLE table_name_59 (location VARCHAR,college_name VARCHAR) | SELECT location FROM table_name_59 WHERE college_name = "kanyakumari government medical college" |
For those employees who did not have any job in the past, find job_id and the sum of employee_id , and group by attribute job_id, and visualize them by a bar chart, list by the JOB_ID from high to low. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID deci... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID DESC |
Count the number of patients who died in or before 2186 and had a chordae tendineae operation. | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2186.0" AND procedures.short_title = "Chordae tendineae ops" |
What is Points Against, when Drawn is '2', and when Points Of is '32'? | CREATE TABLE table_name_80 (points_against VARCHAR,drawn VARCHAR,points VARCHAR) | SELECT points_against FROM table_name_80 WHERE drawn = "2" AND points = "32" |
Name the record for august 28 | CREATE TABLE table_70297 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT "Record" FROM table_70297 WHERE "Date" = 'august 28' |
Number of questions closed as duplicates. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE ReviewRejectionReasons (Id number,Name te... | SELECT YEAR(Posts.CreationDate), COUNT(Posts.Id) FROM Posts INNER JOIN PostHistory AS PH ON PH.PostId = Posts.Id WHERE Posts.PostTypeId = @question AND PH.PostHistoryTypeId = @closed AND CAST(PH.Comment AS TEXT) IN ('1', '101') GROUP BY YEAR(Posts.CreationDate) ORDER BY YEAR(Posts.CreationDate) |
what is the number of patients whose diagnoses icd9 code is 99659 and drug route is 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 lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id t... | 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.icd9_code = "99659" AND prescriptions.route = "ID" |
what was patient 009-12221's sao2 for the first time since 05/23/2101? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE patient (uniquepid text,patienthealths... | 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 = '009-12221')) AND NOT vitalperiodic.sao2 IS NULL AND STRFTIME('... |
What was drawn for llanishen rfc? | CREATE TABLE table_name_56 (drawn VARCHAR,club VARCHAR) | SELECT drawn FROM table_name_56 WHERE club = "llanishen rfc" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.