instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
How many professors will teach ENDODONT 660 in the Summer of 2003 ? | CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday varchar,friday varchar,saturday varchar,sunday varchar,has_final_project varchar,has_final_exam varchar,textbook varchar,class_address varch... | SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ENDODONT' AND course.number = 660 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.o... |
What is the scientific pitch when the Helmholtz pitch is D? | CREATE TABLE table_name_33 (scientific_pitch VARCHAR,helmholtz_pitch VARCHAR) | SELECT scientific_pitch FROM table_name_33 WHERE helmholtz_pitch = "d" |
How many caps have a Position of prop, and a Player of rui cordeiro? | CREATE TABLE table_name_6 (caps VARCHAR,position VARCHAR,player VARCHAR) | SELECT COUNT(caps) FROM table_name_6 WHERE position = "prop" AND player = "rui cordeiro" |
Name the realization for phoneme of /i/ and example of /id a/ | CREATE TABLE table_name_5 (realization VARCHAR,phoneme VARCHAR,example VARCHAR) | SELECT realization FROM table_name_5 WHERE phoneme = "/i/" AND example = "/idːa/" |
How much Attendance has Games smaller than 6, and a W-L-T of 3-2-0, and a Season smaller than 1948? | CREATE TABLE table_14131 ("Season" real,"Games" real,"W-L-T" text,"Attendance" real,"Average" real) | SELECT SUM("Attendance") FROM table_14131 WHERE "Games" < '6' AND "W-L-T" = '3-2-0' AND "Season" < '1948' |
What was the average year that Xuxa 3 earned the certification 2x platinum, and that the sales were higher than 750,000? | CREATE TABLE table_name_60 (year INTEGER,sales VARCHAR,certification VARCHAR,álbum VARCHAR) | SELECT AVG(year) FROM table_name_60 WHERE certification = "2x platinum" AND álbum = "xuxa 3" AND sales > 750 OFFSET 000 |
What original air date was the episode with production code of 5.05? | CREATE TABLE table_28089666_1 (original_air_date VARCHAR,production_code VARCHAR) | SELECT original_air_date FROM table_28089666_1 WHERE production_code = "5.05" |
Users that dupe voted questions against their own question. https://meta.stackoverflow.com/questions/367459/how-to-use-gold-dupehammer-without-abuse | 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 ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE... | SELECT UserId AS "user_link", COUNT(*) AS "times_hammered" FROM PostHistory AS ph INNER JOIN PostLinks AS pl ON pl.PostId = ph.PostId INNER JOIN Posts AS p ON p.Id = pl.RelatedPostId WHERE PostHistoryTypeId = 10 AND ph.UserId != -1 AND Text LIKE '%GoldTagBadge%' AND LinkTypeId = 3 GROUP BY UserId ORDER BY COUNT(*) DESC |
Which Score has a To par larger than 17, and a Player of mike brady? | CREATE TABLE table_59953 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" real,"Money ($)" real) | SELECT "Score" FROM table_59953 WHERE "To par" > '17' AND "Player" = 'mike brady' |
Which settlement has the cyrillic name ? | CREATE TABLE table_2562572_30 (settlement VARCHAR,cyrillic_name_other_names VARCHAR) | SELECT settlement FROM table_2562572_30 WHERE cyrillic_name_other_names = "Сигет" |
Which Attendance that has a Venue of ryavallen? | CREATE TABLE table_44800 ("Date" text,"Venue" text,"Opponents" text,"Score" text,"Comp" text,"Attendance" text) | SELECT "Attendance" FROM table_44800 WHERE "Venue" = 'ryavallen' |
Which County has a Mascot of pacers? | CREATE TABLE table_66299 ("School" text,"Location" text,"Mascot" text,"Size" real,"IHSAA Class" text,"County" text) | SELECT "County" FROM table_66299 WHERE "Mascot" = 'pacers' |
What is the flange thickness when the weight is 19.9? | CREATE TABLE table_2071644_2 (flange_thickness__mm_ VARCHAR,weight__kg_m_ VARCHAR) | SELECT flange_thickness__mm_ FROM table_2071644_2 WHERE weight__kg_m_ = "19.9" |
Longest gaps between answer posting and acceptance. | 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 V.PostId AS "post_link", V.CreationDate AS "accept_date", A.CreationDate AS "question_date", CAST((JULIANDAY(V.CreationDate) - JULIANDAY(A.CreationDate)) * 86400.0 AS INT) AS "difference" FROM Votes AS V INNER JOIN Posts AS A ON (V.PostId = A.Id AND A.PostTypeId = 2) WHERE V.VoteTypeId = 1 ORDER BY 'difference' ... |
How many sockets are listed that have a brand name of 'Core i3-2xx7m'? | CREATE TABLE table_24538587_11 (socket VARCHAR,brand_name__list_ VARCHAR) | SELECT COUNT(socket) FROM table_24538587_11 WHERE brand_name__list_ = "Core i3-2xx7M" |
since 2104, what are the top four most frequently given lab tests to patients in the same month after they were diagnosed with atherosclerosis nec? | CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,item... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.i... |
What is the title of the Series 40 Season 5 show? | CREATE TABLE table_27911342_1 (title VARCHAR,season__number VARCHAR) | SELECT title FROM table_27911342_1 WHERE season__number = 5 |
If the area of a country is over 9,826,675 kilometers and a total of emissions per person less than 14.9, what's the average Population found? | CREATE TABLE table_44401 ("Country" text,"CO2 emissions" text,"Area (in km 2)" real,"Population" real,"Emission / Person" real) | SELECT AVG("Population") FROM table_44401 WHERE "Area (in km 2 )" > '9,826,675' AND "Emission / Person" < '14.9' |
Who was the recipient when the show was nominated for Most Popular Drama after 2004? | CREATE TABLE table_71295 ("Year" real,"Award Show" text,"Category" text,"Recipient(s)" text,"Result" text) | SELECT "Recipient(s)" FROM table_71295 WHERE "Result" = 'nominated' AND "Category" = 'most popular drama' AND "Year" > '2004' |
What is the average Points for a year before 1955? | CREATE TABLE table_70167 ("Year" real,"Team" text,"Chassis" text,"Engine" text,"Points" real) | SELECT AVG("Points") FROM table_70167 WHERE "Year" < '1955' |
How many copies per particle are created by the enterotoxin? | CREATE TABLE table_925 ("RNA Segment (Gene)" real,"Size (s base pair)" real,"Protein" text,"Molecular weight kDa" text,"Location" text,"Copies per particle" text,"Function" text) | SELECT "Copies per particle" FROM table_925 WHERE "Function" = 'Enterotoxin' |
how many patients are admitted under emergency and procedured with other partial resection of intestine? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Other partial resection of small intestine" |
what is the competition when the result is 2-1? | CREATE TABLE table_50655 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Competition" FROM table_50655 WHERE "Result" = '2-1' |
What type of formula did Stirling Moss drive? | CREATE TABLE table_23548160_1 (formula VARCHAR,driver VARCHAR) | SELECT formula FROM table_23548160_1 WHERE driver = "Stirling Moss" |
Which Opponent has an attendance greater than 50,522, and a record of 80-63? | CREATE TABLE table_15153 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT "Opponent" FROM table_15153 WHERE "Attendance" > '50,522' AND "Record" = '80-63' |
Find the number of patients less than 68 years of age who had blood tests done. | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "68" AND lab.fluid = "Blood" |
What was the record on April 1? | CREATE TABLE table_name_44 (record VARCHAR,date VARCHAR) | SELECT record FROM table_name_44 WHERE date = "april 1" |
Please show the different statuses of cities and the average population of cities with each status. | CREATE TABLE competition_record (competition_id number,farm_id number,rank number)CREATE TABLE farm (farm_id number,year number,total_horses number,working_horses number,total_cattle number,oxen number,bulls number,cows number,pigs number,sheep_and_goats number)CREATE TABLE farm_competition (competition_id number,year ... | SELECT status, AVG(population) FROM city GROUP BY status |
Return a bar chart on what are the district names and city populations for all districts that between 200,000 and 2,000,000 residents? | CREATE TABLE store_district (Store_ID int,District_ID int)CREATE TABLE store_product (Store_ID int,Product_ID int)CREATE TABLE product (product_id int,product text,dimensions text,dpi real,pages_per_minute_color real,max_page_size text,interface text)CREATE TABLE district (District_ID int,District_name text,Headquarter... | SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 |
What vehicle has an epa highway fuel economy of 109 mpg-e? | CREATE TABLE table_20549371_3 (vehicle VARCHAR,epa_rated_highway_fuel_economy VARCHAR) | SELECT vehicle FROM table_20549371_3 WHERE epa_rated_highway_fuel_economy = "109 mpg-e" |
What is the total capacity of dorms for each gender? Give me a bar chart, sort by the y-axis in descending. | CREATE TABLE Dorm (dormid INTEGER,dorm_name VARCHAR(20),student_capacity INTEGER,gender VARCHAR(1))CREATE TABLE Lives_in (stuid INTEGER,dormid INTEGER,room_number INTEGER)CREATE TABLE Dorm_amenity (amenid INTEGER,amenity_name VARCHAR(25))CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGE... | SELECT gender, SUM(student_capacity) FROM Dorm GROUP BY gender ORDER BY SUM(student_capacity) DESC |
For the next semester , how many lecture sections are offered for HHCR 700 ? | CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE course_offering (offering_id int,course_id int,semes... | SELECT COUNT(*) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'HHCR' AND course.number = 700 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 |
What tournament had Greg Rusedski as a finalist? | CREATE TABLE table_name_68 (tournament VARCHAR,finalist VARCHAR) | SELECT tournament FROM table_name_68 WHERE finalist = "greg rusedski" |
What is the lowest game for a record of 32-12-3? | CREATE TABLE table_name_48 (game INTEGER,record VARCHAR) | SELECT MIN(game) FROM table_name_48 WHERE record = "32-12-3" |
When 102 mpg-e (33kw-hrs/100mi) is the epa rated combined fuel economy what is the vehicle type? | CREATE TABLE table_27010 ("Vehicle" text,"Operating mode" text,"EPA rated All-electric range" text,"EPA rated combined fuel economy" text,"Clean electric grid California (San Francisco)" text,"U.S. national average electric mix" text,"Dirty electric grid Rocky Mountains (Denver)" text) | SELECT "Vehicle" FROM table_27010 WHERE "EPA rated combined fuel economy" = '102 mpg-e (33kW-hrs/100mi)' |
What is the production code of the episode directed by David Solomon? | CREATE TABLE table_21304155_1 (production_code VARCHAR,directed_by VARCHAR) | SELECT production_code FROM table_21304155_1 WHERE directed_by = "David Solomon" |
what is the age of patient 022-76925 during their last hospital encounter? | 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,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT patient.age FROM patient WHERE patient.uniquepid = '022-76925' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 |
How many faculty members participate in each activity? Return the activity names and the number of faculty members by a bar chart, and display from high to low by the activity_name. | CREATE TABLE Activity (actid INTEGER,activity_name varchar(25))CREATE TABLE Faculty_Participates_in (FacID INTEGER,actid INTEGER)CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR(15),Fname VARCHAR(15),Rank VARCHAR(15),Sex VARCHAR(1),Phone INTEGER,Room VARCHAR(5)... | SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY activity_name DESC |
Users with reputation > 5000 and < 10 answers. | CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,Rej... | SELECT Users.Id AS "user_link", Users.DisplayName, Users.Reputation, SUM(CASE WHEN Posts.PostTypeId = 1 THEN 1 ELSE 0 END) AS Questions, SUM(CASE WHEN Posts.PostTypeId = 2 THEN 1 ELSE 0 END) AS Answers, Users.UpVotes, Users.DownVotes FROM Users INNER JOIN Posts ON Users.Id = Posts.OwnerUserId AND (Posts.PostTypeId = 1 ... |
What is the Rank of the swimmer with a Time of 49 in Lane 7 or larger? | CREATE TABLE table_64464 ("Rank" real,"Lane" real,"Name" text,"Nationality" text,"Time" real) | SELECT COUNT("Rank") FROM table_64464 WHERE "Time" = '49' AND "Lane" > '7' |
What team was the home team when the away team scored 12.11 (83)? | CREATE TABLE table_54290 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team" FROM table_54290 WHERE "Away team score" = '12.11 (83)' |
until 1 year ago, what was the top five most frequent laboratory tests ordered for patients during the same hospital encounter after the diagnosis of no family able to care? | 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 admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_locatio... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id W... |
What is every surface against Sweden? | CREATE TABLE table_26537 ("Edition" text,"Round" text,"Date" text,"Against" text,"Surface" text,"Opponent" text,"Win/Lose" text,"Result" text) | SELECT "Surface" FROM table_26537 WHERE "Against" = 'Sweden' |
how many times patient 027-142451 has had continuous infusion meds taken since 12/2105? | 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 COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-142451')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.c... |
What is smallest Khmer valued less than 90 have a kau sip ALA-LC? | CREATE TABLE table_name_9 (khmer INTEGER,ala_lc VARCHAR,value VARCHAR) | SELECT MIN(khmer) FROM table_name_9 WHERE ala_lc = "kau sip" AND value < 90 |
which is the only defendant who was tried and found not guilty ? | CREATE TABLE table_204_479 (id number,"defendant" text,"arrested" text,"charge" text,"result" text,"sentence" text) | SELECT "defendant" FROM table_204_479 WHERE "result" = 'tried, found not guilty' |
Who was the winner in the stage that Damiano Cunego led the points classification? | CREATE TABLE table_name_48 (winner VARCHAR,points_classification VARCHAR) | SELECT winner FROM table_name_48 WHERE points_classification = "damiano cunego" |
what is the score at Olympia fields, illinois? | CREATE TABLE table_name_80 (score VARCHAR,location VARCHAR) | SELECT score FROM table_name_80 WHERE location = "olympia fields, illinois" |
Which series number has the production code 7.07? | CREATE TABLE table_24881 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text) | SELECT COUNT("No. in series") FROM table_24881 WHERE "Production code" = '7.07' |
Which Perth has Auckland yes and Gold Coast yes? | CREATE TABLE table_70890 ("Auckland" text,"Gold Coast" text,"Sydney" text,"Melbourne" text,"Adelaide" text,"Perth" text) | SELECT "Perth" FROM table_70890 WHERE "Auckland" = 'yes' AND "Gold Coast" = 'yes' |
what is days of hospital stay of subject name jerry deberry? | 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 demographic.days_stay FROM demographic WHERE demographic.name = "Jerry Deberry" |
What's the release date of Forward March Hare? | CREATE TABLE table_name_10 (release_date VARCHAR,title VARCHAR) | SELECT release_date FROM table_name_10 WHERE title = "forward march hare" |
On what Date was the Home Team Score 9.13 (67)? | CREATE TABLE table_58204 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_58204 WHERE "Home team score" = '9.13 (67)' |
what is the away team score when the home team is essendon? | CREATE TABLE table_58498 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_58498 WHERE "Home team" = 'essendon' |
What is the home team score that played away team carlton? | CREATE TABLE table_57264 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team score" FROM table_57264 WHERE "Away team" = 'carlton' |
what was the top five most frequent diagnoses that patients were given in the same hospital visit after receiving a packed cell transfusion a year before? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time... | 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... |
What is the green rating for the vehicle with L/100km urban (cold) over 10.9, mpg in the US (urban) over 14.1, manufacturer of Volkswagen, and engine capacity under 3189? | CREATE TABLE table_14146 ("Manufacturer" text,"Transmission" text,"Engine Capacity" real,"Fuel Type" text,"L/100km Urban (Cold)" real,"L/100km Extra-Urban" real,"L/100km Combined" real,"mpg-UK Urban (Cold)" real,"mpg-UK Extra-Urban" real,"mpg-UK Combined" real,"mpg-US Urban" real,"mpg-US Extra-Urban" real,"mpg-US Combi... | SELECT "Green Rating" FROM table_14146 WHERE "L/100km Urban (Cold)" > '10.9' AND "mpg-US Urban" > '14.1' AND "Manufacturer" = 'volkswagen' AND "Engine Capacity" < '3189' |
What is the lowest drawn that has games less than 7? | CREATE TABLE table_6357 ("Games" real,"Drawn" real,"Lost" real,"Points difference" text,"Points" real) | SELECT MIN("Drawn") FROM table_6357 WHERE "Games" < '7' |
what is days of hospital stay of subject name steven sepulveda? | 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 demographic.days_stay FROM demographic WHERE demographic.name = "Steven Sepulveda" |
What is the categorization in 2010 when it was A in 2008 and 20011 while being QF in 2012? | CREATE TABLE table_55481 ("Tournament" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2010" FROM table_55481 WHERE "2008" = 'a' AND "2011" = 'a' AND "2012" = 'qf' |
What is the date Listed of the Bridge Built CA.1876? | CREATE TABLE table_49983 ("Name" text,"Built" text,"Listed" text,"Location" text,"County" text) | SELECT "Listed" FROM table_49983 WHERE "Built" = 'ca.1876' |
What is the lowest population for the area that has a density of 36.7? | CREATE TABLE table_42839 ("Name" text,"Seat" text,"Population (2011)" real,"Area (km 2)" real,"Density (inhabitants/km 2)" real) | SELECT MIN("Population (2011)") FROM table_42839 WHERE "Density (inhabitants/km 2 )" = '36.7' |
Which Player has a Rank of t12, and a Country of taiwan, and a Lifespan of 1963 ? | CREATE TABLE table_name_4 (player VARCHAR,lifespan VARCHAR,rank VARCHAR,country VARCHAR) | SELECT player FROM table_name_4 WHERE rank = "t12" AND country = "taiwan" AND lifespan = "1963–" |
Show me mean age by sex in a histogram, display x axis in asc order please. | CREATE TABLE Has_Allergy (StuID INTEGER,Allergy VARCHAR(20))CREATE TABLE Allergy_Type (Allergy VARCHAR(20),AllergyType VARCHAR(20))CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3)) | SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY Sex |
What is the most frequent status of bookings? | CREATE TABLE ref_service_types (service_type_code text,parent_service_type_code text,service_type_description text)CREATE TABLE drama_workshop_groups (workshop_group_id number,address_id number,currency_code text,marketing_region_code text,store_name text,store_phone text,store_email_address text,other_details text)CRE... | SELECT status_code FROM bookings GROUP BY status_code ORDER BY COUNT(*) DESC LIMIT 1 |
Name the team for school of milford | CREATE TABLE table_name_44 (team VARCHAR,school VARCHAR) | SELECT team FROM table_name_44 WHERE school = "milford" |
display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN. | CREATE TABLE employees (employee_id VARCHAR,job_id VARCHAR,salary INTEGER) | SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN') |
how many patients whose age is less than 82 and procedure short title is endosc destruc esoph les? | 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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "82" AND procedures.short_title = "Endosc destruc esoph les" |
What are the names and ages of editors? | CREATE TABLE journal (journal_id number,date text,theme text,sales number)CREATE TABLE journal_committee (editor_id number,journal_id number,work_type text)CREATE TABLE editor (editor_id number,name text,age number) | SELECT name, age FROM editor |
SELECT * FROM votes WHERE postId = 12505377;. | CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE Comments (Id number,PostId number,Sc... | SELECT * FROM Votes WHERE PostId = 12505377 |
What is the Panthers' Division Record? | CREATE TABLE table_name_48 (division_record VARCHAR,team VARCHAR) | SELECT division_record FROM table_name_48 WHERE team = "panthers" |
provide the number of patients whose gender is m and days of hospital stay is greater than 6? | 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 text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay > "6" |
What is the number of end dates for incidents with incident type code 'NOISE'? Bin by weekday and return a bar chart, and order in ascending by the y-axis. | CREATE TABLE Ref_Address_Types (address_type_code VARCHAR(15),address_type_description VARCHAR(80))CREATE TABLE Student_Addresses (student_id INTEGER,address_id INTEGER,date_address_from DATETIME,date_address_to DATETIME,monthly_rental DECIMAL(19,4),other_details VARCHAR(255))CREATE TABLE Assessment_Notes (notes_id INT... | SELECT date_incident_start, COUNT(date_incident_start) FROM Behavior_Incident WHERE incident_type_code = "NOISE" ORDER BY COUNT(date_incident_start) |
which are they only two names that have spain as their country of origin ? | CREATE TABLE table_203_573 (id number,"name" text,"rank - 2000" number,"number" number,"country of origin" text,"england - 2001" text) | SELECT "name" FROM table_203_573 WHERE "country of origin" = 'spain' |
What's the Outcome for the Date of July 16, 2011? | CREATE TABLE table_69732 ("Outcome" text,"Date" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text) | SELECT "Outcome" FROM table_69732 WHERE "Date" = 'july 16, 2011' |
What are the ids and names of the architects who built at least 3 bridges ? | CREATE TABLE architect (id VARCHAR,name VARCHAR)CREATE TABLE bridge (architect_id VARCHAR) | SELECT T1.id, T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) >= 3 |
Who drove the car with the n175 chassis in round 13? | CREATE TABLE table_name_1 (driver VARCHAR,chassis VARCHAR,rounds VARCHAR) | SELECT driver FROM table_name_1 WHERE chassis = "n175" AND rounds = "13" |
type i diabetes | CREATE TABLE table_train_206 ("id" int,"gender" string,"pregnancy_or_lactation" bool,"systolic_blood_pressure_sbp" int,"hematocrit_hct" float,"diabetic" string,"contraception" bool,"diastolic_blood_pressure_dbp" int,"serum_creatinine" float,"NOUSE" float) | SELECT * FROM table_train_206 WHERE diabetic = 'i' |
In the circuit Showevent Olympiastadion M nchen, where the winning driver is Bruno Spengler, what is the pole position? | CREATE TABLE table_26267607_2 (pole_position VARCHAR,winning_driver VARCHAR,circuit VARCHAR) | SELECT pole_position FROM table_26267607_2 WHERE winning_driver = "Bruno Spengler" AND circuit = "Showevent Olympiastadion München" |
What is Frank Kimmel's lowest top 5 with more than 0 wins and fewer than 14 top 10s? | CREATE TABLE table_45029 ("Driver" text,"Points" real,"Wins" real,"Top 5" real,"Top 10" real) | SELECT MIN("Top 5") FROM table_45029 WHERE "Wins" > '0' AND "Driver" = 'frank kimmel' AND "Top 10" < '14' |
Which Outcome has a Championship of us championships, and a Score in the final of 5 7, 6 1, 6 3, 6 3? | CREATE TABLE table_name_61 (outcome VARCHAR,championship VARCHAR,score_in_the_final VARCHAR) | SELECT outcome FROM table_name_61 WHERE championship = "us championships" AND score_in_the_final = "5–7, 6–1, 6–3, 6–3" |
What is the title released on 24 July 2005? | CREATE TABLE table_48668 ("Cat. #" text,"Artist" text,"Title" text,"Release date" text,"Format" text,"Other information" text) | SELECT "Title" FROM table_48668 WHERE "Release date" = '24 july 2005' |
Which 5'utr splice's coding is 1a 2, when the Variant id is abd'1a 2? | CREATE TABLE table_name_70 (coding VARCHAR,variant_id VARCHAR) | SELECT 5 AS ’utr_splice FROM table_name_70 WHERE coding = "1a 2" AND variant_id = "abd'1a 2" |
what is minimum age of patients whose gender is f and age is greater than or equal to 89? | 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.gender = "F" AND demographic.age >= "89" |
what was the last hospital discharge time of patient 029-27704? | 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,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '029-27704' ORDER BY patient.hospitaldischargetime DESC LIMIT 1 |
What is the sum of the lowest in attendance when the average is 1,166 and most in attendance is less than 2,215? | CREATE TABLE table_10257 ("Team" text,"Stadium" text,"Capacity" real,"Highest" real,"Lowest" real,"Average" real) | SELECT SUM("Lowest") FROM table_10257 WHERE "Average" = '1,166' AND "Highest" < '2,215' |
Top 10 users with the most questions.. | CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)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 PostTypes (Id number,Na... | SELECT DisplayName AS "user", COUNT(Posts.Id) AS Questions FROM Posts INNER JOIN Users ON Users.Id = OwnerUserId WHERE PostTypeId = 2 GROUP BY Users.Id, DisplayName ORDER BY 'questions' DESC LIMIT 10 |
What is the Akira when Tiger Mask IV is Akira (10:05)? | CREATE TABLE table_52612 ("Block A" text,"Akira" text,"Atsushi Aoki" text,"Black Tiger V" text,"Jado" text,"Milano Collection A.T." text,"Prince Devitt" text,"Tiger Mask IV" text) | SELECT "Akira" FROM table_52612 WHERE "Tiger Mask IV" = 'akira (10:05)' |
provide the number of patients whose admission year is less than 2105 and diagnoses long title is personal history of other malignant neoplasm of skin? | 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 < "2105" AND diagnoses.long_title = "Personal history of other malignant neoplasm of skin" |
What was the lowest Crowd Size for the Home Team of North Melbourne? | CREATE TABLE table_11947 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT MIN("Crowd") FROM table_11947 WHERE "Home team" = 'north melbourne' |
Tell me the block A for antonio thomas of kondo (13:24) | CREATE TABLE table_54839 ("Block A" text,"Antonio Thomas" text,"Hikaru Sato" text,"Hiroshi Yamato" text,"Kaz Hayashi" text,"Minoru" text,"Super Crazy" text) | SELECT "Block A" FROM table_54839 WHERE "Antonio Thomas" = 'kondo (13:24)' |
For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the name , and group by attribute name, and could you display total number in desc order please? | 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) | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code DESC |
Return a bar chart about the distribution of All_Home and the amount of All_Home , and group by attribute All_Home, I want to sort by the total number from low to high. | CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)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_Perce... | SELECT All_Home, COUNT(All_Home) FROM basketball_match GROUP BY All_Home ORDER BY COUNT(All_Home) |
What is the frequency of the model whose part number is ado520biaa5do? | CREATE TABLE table_895 ("Model Number" text,"Stepping" text,"Frequency" text,"L2 Cache" text,"HT" text,"Multi 1" text,"V Core" text,"TDP" text,"Socket" text,"Release Date" text,"Part Number(s)" text) | SELECT "Frequency" FROM table_895 WHERE "Part Number(s)" = 'ADO520BIAA5DO' |
What year was the university that is located in Ellensburg, Washington established? | CREATE TABLE table_20530 ("Institution" text,"Location" text,"Founded" real,"Affiliation" text,"Enrollment" real,"Team Nickname" text,"Primary conference" text) | SELECT MIN("Founded") FROM table_20530 WHERE "Location" = 'Ellensburg, Washington' |
What was the highest number of votes for mir-hossein mousavi when the number of invalid votes is 5683 | CREATE TABLE table_26002 ("Province" text,"Mahmoud Ahmadinejad" real,"Mehdi Karroubi" real,"Mir-Hossein Mousavi" real,"Mohsen Rezaee" real,"Spoiled ballots" real,"Total votes" real) | SELECT MAX("Mir-Hossein Mousavi") FROM table_26002 WHERE "Spoiled ballots" = '5683' |
does TW have a flight from INDIANAPOLIS to HOUSTON arriving at 1100 | 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_code text,stops int,time_elapsed int,to_airport varchar)CREATE TABLE fare (fare_id in... | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'HOUSTON' AND flight.arrival_time = 1100 AND flight.to_airport = AIRPORT_SERVICE_1.airpor... |
What is the date with the distance of km (mi) at the course of roccaraso to san giorgio del sannio? | CREATE TABLE table_name_20 (date VARCHAR,distance VARCHAR,course VARCHAR) | SELECT date FROM table_name_20 WHERE distance = "km (mi)" AND course = "roccaraso to san giorgio del sannio" |
Which Club has a League goals of 21? | CREATE TABLE table_name_66 (club VARCHAR,league_goals VARCHAR) | SELECT club FROM table_name_66 WHERE league_goals = "21" |
How many different scores did Team Europe get when Mika Koivuniemi played for them? | CREATE TABLE table_22788 ("Match no." real,"Match Type" text,"Team Europe" text,"Score" text,"Team USA" text,"Progressive Total" text) | SELECT COUNT("Score") FROM table_22788 WHERE "Team Europe" = 'Mika Koivuniemi' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.