instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What player has over 1 first apperance and over 32 first team goals? | CREATE TABLE table_56928 ("Player" text,"Position" text,"First-Team Debut" text,"First-Team Appearances" real,"First-Team Goals" real,"Current Club" text) | SELECT "Player" FROM table_56928 WHERE "First-Team Appearances" > '1' AND "First-Team Goals" = '32' |
How many different episode numbers are there for episodes directed by Wayne Rose? | CREATE TABLE table_21696800_1 (_number VARCHAR,directed_by VARCHAR) | SELECT COUNT(_number) FROM table_21696800_1 WHERE directed_by = "Wayne Rose" |
What is College, when Pick is less than 145, and when Player is Jeff Wilkins? | CREATE TABLE table_name_34 (college VARCHAR,pick VARCHAR,player VARCHAR) | SELECT college FROM table_name_34 WHERE pick < 145 AND player = "jeff wilkins" |
What is Attendance, when Opponent is Pittsburgh Steelers? | CREATE TABLE table_name_2 (attendance VARCHAR,opponent VARCHAR) | SELECT attendance FROM table_name_2 WHERE opponent = "pittsburgh steelers" |
What college picked someone from The Episcopal Academy? | CREATE TABLE table_12036 ("Player" text,"Height" text,"School" text,"Hometown" text,"College" text) | SELECT "College" FROM table_12036 WHERE "School" = 'episcopal academy' |
what is minimum age of patients whose primary disease is liver transplant and year of birth is greater than 2053? | 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 MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "LIVER TRANSPLANT" AND demographic.dob_year > "2053" |
Which courses have been or will be taught by Kathy Velikov ? | CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varcha... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Kathy Velikov%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id =... |
What is the listed crowd when hawthorn is away? | CREATE TABLE table_77907 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT COUNT("Crowd") FROM table_77907 WHERE "Away team" = 'hawthorn' |
What is the power at Baguio where the frequency is 102.3mhz? | CREATE TABLE table_name_59 (power__kw_ VARCHAR,frequency VARCHAR,location VARCHAR) | SELECT power__kw_ FROM table_name_59 WHERE frequency = "102.3mhz" AND location = "baguio" |
how many patients whose insurance is government and diagnoses short title is malig neo brain nec? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Government" AND diagnoses.short_title = "Malig neo brain NEC" |
Name the driver/passenger for position 8 | CREATE TABLE table_21009 ("Position" real,"Driver / Passenger" text,"Equipment" text,"Bike No" real,"Points" real) | SELECT "Driver / Passenger" FROM table_21009 WHERE "Position" = '8' |
what is the difference of arterial bp [diastolic] patient 22648 has last measured on the first icu visit compared to the value second to last measured on the first icu visit? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)C... | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22648) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.item... |
Which Nation has a Gold of 0, and a Bronze smaller than 6, and a Rank of 6? | CREATE TABLE table_name_91 (nation VARCHAR,rank VARCHAR,gold VARCHAR,bronze VARCHAR) | SELECT nation FROM table_name_91 WHERE gold = 0 AND bronze < "6" AND rank = "6" |
What week has a Date of October 4, 1992? | CREATE TABLE table_name_78 (week INTEGER,date VARCHAR) | SELECT SUM(week) FROM table_name_78 WHERE date = "october 4, 1992" |
what's the result with opponent being at oakland raiders | CREATE TABLE table_932 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Stadium" text,"Record" text,"Attendance" real) | SELECT "Result" FROM table_932 WHERE "Opponent" = 'at Oakland Raiders' |
What is Paino Hehea's date of birth? | CREATE TABLE table_name_46 (date_of_birth__age_ VARCHAR,player VARCHAR) | SELECT date_of_birth__age_ FROM table_name_46 WHERE player = "paino hehea" |
What was the Browns record after they played the game at the Paul Brown stadium? | CREATE TABLE table_name_41 (record VARCHAR,stadium VARCHAR) | SELECT record FROM table_name_41 WHERE stadium = "paul brown stadium" |
Nam ethe place for pat perez | CREATE TABLE table_name_43 (place VARCHAR,player VARCHAR) | SELECT place FROM table_name_43 WHERE player = "pat perez" |
What is the 2004 population for ? | CREATE TABLE table_name_46 (population__2004_est_ VARCHAR,hanzi VARCHAR) | SELECT population__2004_est_ FROM table_name_46 WHERE hanzi = "山海关区" |
subject has a total moca score of < 26 at screening. | CREATE TABLE table_train_96 ("id" int,"gender" string,"elevated_creatinine" float,"diabetic" string,"cerebrovascular_disease" bool,"moca_score" int,"parkinsonism" bool,"NOUSE" float) | SELECT * FROM table_train_96 WHERE moca_score < 26 |
Which Telugu has a Tamil of p sam ? | CREATE TABLE table_35103 ("Sanskrit \u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d" text,"Tamil \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" text,"Telugu \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" text,"Kannada \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" text,"Malayalam \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" text,"Mongolian" text) | SELECT "Telugu \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" FROM table_35103 WHERE "Tamil \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" = 'pūsam பூசம்' |
What is the sum of Mpix with a maximum fps HDRX of less than 12 with a width larger than 5120? | CREATE TABLE table_70537 ("Frame size" text,"Width" real,"Height" real,"Mpix" real,"Aspect Ratio" text,"Maximum fps" real,"Maximum fps HDRx" real,"least compression at 24 fps" text,"least compression at maximum fps" text) | SELECT SUM("Mpix") FROM table_70537 WHERE "Maximum fps HDRx" < '12' AND "Width" > '5120' |
What number in series was the episode written by Eric Gilliland? | CREATE TABLE table_30173 ("No. in series" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real) | SELECT MAX("No. in series") FROM table_30173 WHERE "Written by" = 'Eric Gilliland' |
Which celebrity was raised 03? | CREATE TABLE table_490 ("Celebrity" text,"Background" text,"Original Team" text,"Age" real,"Hometown" text,"Charity" text,"Result" text,"Raised" text) | SELECT "Celebrity" FROM table_490 WHERE "Raised" = '03' |
Which name has a Lane smaller than 3, a Heat larger than 4, and a Time of 2:00.80? | CREATE TABLE table_15622 ("Heat" real,"Lane" real,"Name" text,"Nationality" text,"Time" text) | SELECT "Name" FROM table_15622 WHERE "Lane" < '3' AND "Heat" > '4' AND "Time" = '2:00.80' |
How many episodes were portrayed by Nick Jonas? | CREATE TABLE table_name_81 (_number_of_episodes VARCHAR,portrayed_by VARCHAR) | SELECT COUNT(_number_of_episodes) FROM table_name_81 WHERE portrayed_by = "nick jonas" |
Dave Douglas has what score? | CREATE TABLE table_15525 ("Place" text,"Player" text,"Country" text,"Score" real,"To par" text) | SELECT "Score" FROM table_15525 WHERE "Player" = 'dave douglas' |
what is admission time and discharge time of subject id 64208? | 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 demographic.admittime, demographic.dischtime FROM demographic WHERE demographic.subject_id = "64208" |
On what day is geelong the home team? | CREATE TABLE table_4770 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_4770 WHERE "Home team" = 'geelong' |
Name the most extra points for john heston | CREATE TABLE table_14341967_2 (extra_points INTEGER,player VARCHAR) | SELECT MAX(extra_points) FROM table_14341967_2 WHERE player = "John Heston" |
What season for the team with over 2 tournaments and 13 regular season titles? | CREATE TABLE table_10830 ("Team" text,"Season" text,"Regular Season" real,"Tournament" real,"Total" real) | SELECT "Season" FROM table_10830 WHERE "Tournament" > '2' AND "Regular Season" = '13' |
What is the round of the game at venue H and opponent of Derby County? | CREATE TABLE table_name_31 (round VARCHAR,venue VARCHAR,opponent VARCHAR) | SELECT round FROM table_name_31 WHERE venue = "h" AND opponent = "derby county" |
count the number of patients whose admission year is less than 2174 and diagnoses long title is below knee amputation status? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2174" AND diagnoses.long_title = "Below knee amputation status" |
When have a Save of ||20,599||32-37? | CREATE TABLE table_name_90 (date VARCHAR,save VARCHAR) | SELECT date FROM table_name_90 WHERE save = "||20,599||32-37" |
What is the Gecko value for the item that has a Prince XML value of 'no' and a KHTML value of 'yes'? | CREATE TABLE table_name_6 (gecko VARCHAR,prince_xml VARCHAR,khtml VARCHAR) | SELECT gecko FROM table_name_6 WHERE prince_xml = "yes" AND khtml = "yes" |
which nation earned only one silver medal ? | CREATE TABLE table_203_576 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT "nation" FROM table_203_576 WHERE "silver" = 1 |
Questions with a specific tag both at first and current revision. | 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 ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId nu... | SELECT SUM(CASE WHEN HadTag = 1 AND HasTag = 0 THEN 1 ELSE 0 END) AS TagRemoved, SUM(CASE WHEN HadTag = 0 AND HasTag = 1 THEN 1 ELSE 0 END) AS TagAdded, SUM(CASE WHEN HadTag = 1 AND HasTag = 1 THEN 1 ELSE 0 END) AS TagPersisted, SUM(CASE WHEN HadTag = 1 OR HasTag = 1 THEN 1 ELSE 0 END) AS Total FROM (SELECT CASE WHEN P... |
What was the ranking of Beirasar Rosal a, the year they played 32 games? | CREATE TABLE table_41415 ("Rank" real,"Name" text,"Team" text,"Games" real,"Points" real) | SELECT MAX("Rank") FROM table_41415 WHERE "Team" = 'beirasar rosalía' AND "Games" < '32' |
Which opponent had a time of 1:26? | CREATE TABLE table_name_1 (opponent VARCHAR,time VARCHAR) | SELECT opponent FROM table_name_1 WHERE time = "1:26" |
What is the name of the pictorial in the 11-98 issue? | CREATE TABLE table_20229 ("Date" text,"Cover model" text,"Centerfold model" text,"Interview subject" text,"20 Questions" text,"Pictorials" text) | SELECT "Pictorials" FROM table_20229 WHERE "Date" = '11-98' |
information on flights from DENVER to PHILADELPHIA | CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id int,flight_number int,from_airport varchar,meal... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADE... |
What date was the score 5-2 with a loss of sele (3-2)? | CREATE TABLE table_name_17 (date VARCHAR,score VARCHAR,loss VARCHAR) | SELECT date FROM table_name_17 WHERE score = "5-2" AND loss = "sele (3-2)" |
Plot the number of county by grouped by county as a bar graph, and list by the y axis in descending. | CREATE TABLE wine (No INTEGER,Grape TEXT,Winery TEXT,Appelation TEXT,State TEXT,Name TEXT,Year INTEGER,Price INTEGER,Score INTEGER,Cases INTEGER,Drink TEXT)CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT) | SELECT County, COUNT(County) FROM appellations GROUP BY County ORDER BY COUNT(County) DESC |
What year's Season had an Overall of 77? | CREATE TABLE table_53194 ("Season" real,"Overall" text,"Slalom" text,"Super G" text,"Downhill" text,"Combined" text) | SELECT "Season" FROM table_53194 WHERE "Overall" = '77' |
what is the daily maximum mch value for patient 006-99708 in this month? | 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 treatment (treatmentid number,patientu... | SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-99708')) AND lab.labname = 'mch' AND DATETIME(lab.labresulttime, 'start of mon... |
Top 100 answers by score. | 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,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans... | SELECT pa.Id AS "post_link", pa.Score, pq.Tags FROM Posts AS pa INNER JOIN Posts AS pq ON pa.ParentId = pq.Id WHERE pa.PostTypeId = 2 ORDER BY Score DESC LIMIT 100 |
Distribution of HNQs based on minutes until entering. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,Accepte... | WITH times_cte AS (SELECT p.Id AS pid, p.CreationDate AS cre, ph.CreationDate AS hot, CAST((JULIANDAY(CreationDate) - JULIANDAY(p.CreationDate)) * 1440.0 AS INT) AS minutes FROM PostHistory AS ph INNER JOIN Posts AS p ON ph.PostId = p.Id WHERE ph.PostHistoryTypeId = 52) SELECT minutes, COUNT(pid) AS Count FROM times_ct... |
What was the Termination of Mission date for the ambassador who was appointed by Barack Obama? | CREATE TABLE table_name_40 (termination_of_mission VARCHAR,appointed_by VARCHAR) | SELECT termination_of_mission FROM table_name_40 WHERE appointed_by = "barack obama" |
during the previous year, what are the three most frequent interventions that patients were given in the same hospital encounter after receiving endotracheal tube? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabe... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'endot... |
What is the IHSAA class for the team located in Middlebury, IN? | CREATE TABLE table_79671 ("School" text,"Location" text,"Mascot" text,"Size" real,"IHSAA Class" text,"County" text,"Year Joined" real,"Previous Conference" text) | SELECT "IHSAA Class" FROM table_79671 WHERE "Location" = 'middlebury, in' |
how many patients have stayed in the hospital for more than 27 days and whose discharge location was rehab/distinct part hospital? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "REHAB/DISTINCT PART HOSP" AND demographic.days_stay > "27" |
Name the most obama number for mccain being 38.86% | CREATE TABLE table_20468206_1 (obama_number INTEGER,mccain_percentage VARCHAR) | SELECT MAX(obama_number) FROM table_20468206_1 WHERE mccain_percentage = "38.86%" |
what is drug dose of drug name theophylline sr? | 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 prescriptions.drug_dose FROM prescriptions WHERE prescriptions.drug = "Theophylline SR" |
What was kumar sangakkara's average? | CREATE TABLE table_26041144_11 (average VARCHAR,player VARCHAR) | SELECT average FROM table_26041144_11 WHERE player = "Kumar Sangakkara" |
What is the lowest pick for the Buffalo Bills? | CREATE TABLE table_66592 ("Pick" real,"Team" text,"Player" text,"Position" text,"College" text) | SELECT MIN("Pick") FROM table_66592 WHERE "Team" = 'buffalo bills' |
A bar chart showing the first name of all the faculty members who participated in some activity, together with the number of activities they participated in, display y-axis from low to high order. | CREATE TABLE Activity (actid INTEGER,activity_name varchar(25))CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Faculty_Participates_in (FacID INTEG... | SELECT Fname, COUNT(*) FROM Faculty AS T1 JOIN Faculty_Participates_in AS T2 ON T1.FacID = T2.FacID GROUP BY T1.FacID ORDER BY COUNT(*) |
what is the name when the nation is soviet union and the points is 185? | CREATE TABLE table_name_4 (name VARCHAR,nation VARCHAR,points VARCHAR) | SELECT name FROM table_name_4 WHERE nation = "soviet union" AND points = 185 |
How many clubs are involved when there are 4 winners from the previous rounds and more than 4 clubs remaining? | CREATE TABLE table_63655 ("Round" text,"Clubs remaining" real,"Clubs involved" real,"Winners from previous round" text,"New entries this round" text,"Leagues entering at this round" text) | SELECT MIN("Clubs involved") FROM table_63655 WHERE "Winners from previous round" = '4' AND "Clubs remaining" > '4' |
when was patient 016-34426 until 2103 admitted for the first time to the hospital? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname... | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '016-34426' AND STRFTIME('%y', patient.hospitaladmittime) <= '2103' ORDER BY patient.hospitaladmittime LIMIT 1 |
What Time/Retired has a Points that's smaller than 11 and has a Laps of 74? | CREATE TABLE table_34052 ("Driver" text,"Team" text,"Laps" real,"Time/Retired" text,"Grid" real,"Points" real) | SELECT "Time/Retired" FROM table_34052 WHERE "Points" < '11' AND "Laps" = '74' |
What Opponent has a Site of war memorial stadium little rock, ar, and a Result of l6 7? | CREATE TABLE table_name_63 (opponent VARCHAR,site VARCHAR,result VARCHAR) | SELECT opponent FROM table_name_63 WHERE site = "war memorial stadium • little rock, ar" AND result = "l6–7" |
What courses offer 17 credit hours ? | CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,r... | SELECT DISTINCT name, number FROM course WHERE credits = 17 AND department = 'EECS' |
What year was the rider with a final position-tour of 88 and less than 11 final position-giros? | CREATE TABLE table_69461 ("Rider" text,"Year" real,"Final Position - Giro" real,"Final Position - Tour" real,"Final Position - Vuelta" real) | SELECT SUM("Year") FROM table_69461 WHERE "Final Position - Tour" = '88' AND "Final Position - Giro" < '11' |
when was the next coach appointed after niger tornadoes fired their coach? | CREATE TABLE table_28164986_4 (date_of_appointment VARCHAR,manner_of_departure VARCHAR,team VARCHAR) | SELECT date_of_appointment FROM table_28164986_4 WHERE manner_of_departure = "fired" AND team = "Niger Tornadoes" |
in the number of episode in season is 11, who was the writer? | CREATE TABLE table_21313498_1 (written_by VARCHAR,no_in_season VARCHAR) | SELECT written_by FROM table_21313498_1 WHERE no_in_season = 11 |
Which Played has a PD per game larger than 6.28, and a Loss smaller than 4? | CREATE TABLE table_46177 ("Rank" real,"Team" text,"Played" real,"Loss" real,"Last 5" text,"Streak" text,"PF per game" real,"PA per game" real,"PD per game" real,"Winning %" text) | SELECT MIN("Played") FROM table_46177 WHERE "PD per game" > '6.28' AND "Loss" < '4' |
How often is the table tennis competition held? | CREATE TABLE table_name_13 (held_every VARCHAR,sport VARCHAR) | SELECT held_every FROM table_name_13 WHERE sport = "table tennis" |
Which Draw had 8 Televote Points? | CREATE TABLE table_name_43 (draw VARCHAR,televote_points VARCHAR) | SELECT COUNT(draw) FROM table_name_43 WHERE televote_points = "8" |
Which Captain 2 has a Result of ireland by 8 runs? | CREATE TABLE table_name_87 (captain_2 VARCHAR,result VARCHAR) | SELECT captain_2 FROM table_name_87 WHERE result = "ireland by 8 runs" |
how many times do patient 030-80604 go to icu in their last hospital visit? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname... | SELECT COUNT(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-80604' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) |
Which Winners is the highest one that has a Rank larger than 7, and a Third smaller than 1? | CREATE TABLE table_name_44 (winners INTEGER,rank VARCHAR,third VARCHAR) | SELECT MAX(winners) FROM table_name_44 WHERE rank > 7 AND third < 1 |
What Colors has a School of zeigler high school? | CREATE TABLE table_61829 ("School" text,"Location" text,"Nickname(s)" text,"Colors" text,"Years Member" text) | SELECT "Colors" FROM table_61829 WHERE "School" = 'zeigler high school' |
What is the lowest percentage opposing prohibition when the number opposing is 9,575 and the percent supporting is less than 72.2? | CREATE TABLE table_51222 ("Jurisdiction" text,"For Prohibition" real,"Percent For" real,"Against Prohibition" real,"Percent Against" real) | SELECT MIN("Percent Against") FROM table_51222 WHERE "Against Prohibition" = '9,575' AND "Percent For" < '72.2' |
Who was the opposing team when the scorers were jong-a-pin 19'( o.g. ) , gattuso 23' , inzaghi 69'? | CREATE TABLE table_name_84 (opponent_team VARCHAR,scorers VARCHAR) | SELECT opponent_team FROM table_name_84 WHERE scorers = "jong-a-pin 19'( o.g. ) , gattuso 23' , inzaghi 69'" |
Who was the away team for the game at Victoria Park? | CREATE TABLE table_33549 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team" FROM table_33549 WHERE "Venue" = 'victoria park' |
how many district with incumbent being david delano glover | CREATE TABLE table_18666 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT COUNT("District") FROM table_18666 WHERE "Incumbent" = 'David Delano Glover' |
How many players have the pick number 166? | CREATE TABLE table_73128 ("Pick #" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text) | SELECT COUNT("Player") FROM table_73128 WHERE "Pick #" = '166' |
What is the location and attendance of game 44? | CREATE TABLE table_name_65 (location_attendance VARCHAR,game VARCHAR) | SELECT location_attendance FROM table_name_65 WHERE game = 44 |
Which organisation type hires most research staff? | CREATE TABLE Research_Staff (employer_organisation_id VARCHAR)CREATE TABLE Organisations (organisation_type VARCHAR,organisation_id VARCHAR) | SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1 |
hmm.. what was patient 49295's last ph until 6 months ago? | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name 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 labevents (row_id number,subject_id number,hadm_id n... | SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 49295) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ph') AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-6 month') O... |
how many patients had atrial septal defect / mitral valve replacement;repair atrial-septal defect/sda as their primary disease? | 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 text,icustay_id text,drug_type text,drug text,formulary_drug_cd t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" |
What socialist workers ticket has malcolm wilson as the Republican ticket? | CREATE TABLE table_name_71 (socialist_workers_ticket VARCHAR,republican_ticket VARCHAR) | SELECT socialist_workers_ticket FROM table_name_71 WHERE republican_ticket = "malcolm wilson" |
tell me the amount of ns that patient 031-24460 has received. | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis... | 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 = 'ns' A... |
How many Episodes have a Romaji Title of slow dance? | CREATE TABLE table_64718 ("Japanese Title" text,"Romaji Title" text,"TV Station" text,"Episodes" real,"Average Ratings" text) | SELECT SUM("Episodes") FROM table_64718 WHERE "Romaji Title" = 'slow dance' |
What is the Portuguese word for the English word 'grandfather'? | CREATE TABLE table_28805 ("English" text,"Galician (Official)" text,"Galician (Reintegrationist)" text,"Portuguese" text,"Spanish" text) | SELECT "Portuguese" FROM table_28805 WHERE "English" = 'Grandfather' |
What is the entry for Upper index Kcal/ Nm 3 for the row with an entry that has a Lower index MJ/ Nm 3 larger than 47.91, for propylene, and an Upper index MJ/ Nm 3 larger than 77.04? | CREATE TABLE table_64436 ("Fuel gas" text,"Upper index Kcal/ Nm 3" real,"Lower index Kcal/ Nm 3" real,"Upper index MJ/ Nm 3" real,"Lower index MJ/ Nm 3" real) | SELECT SUM("Upper index Kcal/ Nm 3") FROM table_64436 WHERE "Lower index MJ/ Nm 3" > '47.91' AND "Fuel gas" = 'propylene' AND "Upper index MJ/ Nm 3" > '77.04' |
Reputation per 1000 characters, for users > 2k.. | 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,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans... | SELECT u.DisplayName AS "user_link", COUNT(p.Id) AS "post_count", u.Reputation AS "user_reputation", u.Reputation * 1000 / SUM(LENGTH(p.Body)) AS "user_rpc1k" FROM Users AS U JOIN Posts AS p ON p.OwnerUserId = u.Id WHERE u.Reputation > 2000 GROUP BY u.DisplayName, u.Reputation ORDER BY 'user_rpc1k' DESC LIMIT 1000 |
What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county? | CREATE TABLE csu_fees (campus number,year number,campusfee number)CREATE TABLE enrollments (campus number,year number,totalenrollment_ay number,fte_ay number)CREATE TABLE degrees (year number,campus number,degrees number)CREATE TABLE campuses (id number,campus text,location text,county text,year number)CREATE TABLE fac... | SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT MAX(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = "Orange") |
When the foursome was w-l-h is 1 0 0 won w/ p. creamer 3&2, what was the points %? | CREATE TABLE table_20656 ("Year" text,"Total matches" real,"Total W-L-H" text,"Singles W-L-H" text,"Foursomes W-L-H" text,"Fourballs W-L-H" text,"Points won" text,"Points %" text) | SELECT "Points %" FROM table_20656 WHERE "Foursomes W-L-H" = '1–0–0 won w/ P. Creamer 3&2' |
Return a bar chart showing the number of documents stored in each weekday. | CREATE TABLE Documents_to_be_Destroyed (Document_ID INTEGER,Destruction_Authorised_by_Employee_ID INTEGER,Destroyed_by_Employee_ID INTEGER,Planned_Destruction_Date DATETIME,Actual_Destruction_Date DATETIME,Other_Details VARCHAR(255))CREATE TABLE Roles (Role_Code CHAR(15),Role_Name VARCHAR(255),Role_Description VARCHAR(... | SELECT Date_Stored, COUNT(Date_Stored) FROM All_Documents AS T1 JOIN Ref_Calendar AS T2 ON T1.Date_Stored = T2.Calendar_Date |
what was the total of the cerebral drain r ventricular drain output that patient 94937 had on 12/27/last year? | CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (row_id nu... | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 94937)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'cer... |
How many points have a loss less than 5, and 0 for draws? | CREATE TABLE table_name_96 (points VARCHAR,losses VARCHAR,draws VARCHAR) | SELECT COUNT(points) FROM table_name_96 WHERE losses < 5 AND draws = 0 |
What day did the episode with a production code of 218 originally air? | CREATE TABLE table_22265225_1 (original_air_date VARCHAR,production_code VARCHAR) | SELECT original_air_date FROM table_22265225_1 WHERE production_code = "218" |
Visualize a bar chart for what are the names of different tracks, and how many races has each had?, and display y axis from high to low order. | CREATE TABLE track (Track_ID int,Name text,Location text,Seating real,Year_Opened real)CREATE TABLE race (Race_ID int,Name text,Class text,Date text,Track_ID text) | SELECT T2.Name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.Track_ID = T2.Track_ID GROUP BY T1.Track_ID ORDER BY COUNT(*) DESC |
What is the highest number of students for schools in Campbell with pupil to teacher ratios over 25? | CREATE TABLE table_39442 ("School Name" text,"City" text,"Students" real,"FTE Teachers" real,"Pupil/Teacher Ratio" real) | SELECT MAX("Students") FROM table_39442 WHERE "City" = 'campbell' AND "Pupil/Teacher Ratio" > '25' |
In 1939, what was the finish? | CREATE TABLE table_name_89 (finish VARCHAR,year VARCHAR) | SELECT finish FROM table_name_89 WHERE year = "1939" |
tell me the five most frequent lab test that was ordered since 2101? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE vitalperiodic (vitalperiodicid number,... | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE STRFTIME('%y', lab.labresulttime) >= '2101' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 5 |
How many trains are there for the route via trivandrum, ernakulam, newdelhi? | CREATE TABLE table_29770377_1 (train_number VARCHAR,route_via VARCHAR) | SELECT COUNT(train_number) FROM table_29770377_1 WHERE route_via = "Trivandrum, Ernakulam, NewDelhi" |
What is the English character for Lin Ming Kuan ( )? | CREATE TABLE table_64304 ("Year" real,"Chinese Title" text,"English" text,"Role" text,"Character" text) | SELECT "English" FROM table_64304 WHERE "Character" = 'lin ming kuan (林明寬)' |
What was the name of the race in Bordeaux? | CREATE TABLE table_16774 ("Race Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Constructor" text,"Report" text) | SELECT "Race Name" FROM table_16774 WHERE "Circuit" = 'Bordeaux' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.