instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Show the names of people and the number of times they have been on the affirmative side of debates. Show a pie chart. | CREATE TABLE debate_people (Debate_ID int,Affirmative int,Negative int,If_Affirmative_Win bool)CREATE TABLE people (People_ID int,District text,Name text,Party text,Age int)CREATE TABLE debate (Debate_ID int,Date text,Venue text,Num_of_Audience int) | SELECT Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name |
In what League is Left Wing Yanick Dupre? | CREATE TABLE table_38788 ("Round" text,"Player" text,"Position" text,"Nationality" text,"College/Junior/Club Team (League)" text) | SELECT "College/Junior/Club Team (League)" FROM table_38788 WHERE "Position" = 'left wing' AND "Player" = 'yanick dupre' |
Count the number of accounts. | CREATE TABLE ref_budget_codes (budget_type_code text,budget_type_description text)CREATE TABLE statements (statement_id number,statement_details text)CREATE TABLE projects (project_id number,project_details text)CREATE TABLE documents (document_id number,document_type_code text,project_id number,document_date time,docu... | SELECT COUNT(*) FROM accounts |
Which episode number aired on 18 october 2012? | CREATE TABLE table_25721_3 (episode_no INTEGER,airdate VARCHAR) | SELECT MIN(episode_no) FROM table_25721_3 WHERE airdate = "18 October 2012" |
What is the figure for December 28 for ang tanging ina mo (last na 'to!)? | CREATE TABLE table_31000 ("Movies" text,"December 25" text,"December 26" text,"December 27" text,"December 28" text,"December 25-28 total" text,"Total 2-week Gross" text) | SELECT "December 28" FROM table_31000 WHERE "Movies" = 'Ang Tanging Ina Mo (Last na ''To!)' |
what is 1977 when 1980 is chile? | CREATE TABLE table_name_65 (Id VARCHAR) | SELECT 1977 FROM table_name_65 WHERE 1980 = "chile" |
What is the position of the player who is from the United States and has 30 minutes? | CREATE TABLE table_26451 ("Name" text,"Nationality" text,"Position" text,"Appearances" real,"Starts" real,"Minutes" real,"Goals" real) | SELECT "Position" FROM table_26451 WHERE "Nationality" = 'United States' AND "Minutes" = '30' |
What school is in Lagrange, with an IHSAA Class of aaa? | CREATE TABLE table_63313 ("School" text,"Location" text,"Mascot" text,"Enrollment" real,"IHSAA Class" text,"# / County" text) | SELECT "School" FROM table_63313 WHERE "Location" = 'lagrange' AND "IHSAA Class" = 'aaa' |
count the number of patients whose primary disease is sepsis and admission year is less than 2162? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SEPSIS" AND demographic.admityear < "2162" |
What is the lowest Lost, when Goals For is greater than 52, when Points 1 is '44', and when Drawn is less than 8? | CREATE TABLE table_name_88 (lost INTEGER,drawn VARCHAR,goals_for VARCHAR,points_1 VARCHAR) | SELECT MIN(lost) FROM table_name_88 WHERE goals_for > 52 AND points_1 = "44" AND drawn < 8 |
which team had the least amount on losses ? | CREATE TABLE table_203_30 (id number,"place" number,"team" text,"played" number,"won" number,"draw" number,"lost" number,"goals\nscored" number,"goals\nconceded" number,"+/-" number,"points" number) | SELECT "team" FROM table_203_30 WHERE "lost" = (SELECT MIN("lost") FROM table_203_30) |
For those products with a price between 60 and 120, a pie chart shows the proportion of name and manufacturer. | 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 Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 |
On which date was the opponent ireland and the status Five Nations? | CREATE TABLE table_name_67 (date VARCHAR,status VARCHAR,opposing_teams VARCHAR) | SELECT date FROM table_name_67 WHERE status = "five nations" AND opposing_teams = "ireland" |
Which bridge was completed in 1928? | CREATE TABLE table_12776 ("Name" text,"Location" text,"Land" text,"Longest span in s metre (feet)" text,"Arch type" text,"Completed" text) | SELECT "Name" FROM table_12776 WHERE "Completed" = '1928' |
On which date was the record of 43.89 m set? | CREATE TABLE table_name_35 (date VARCHAR,record VARCHAR) | SELECT date FROM table_name_35 WHERE record = "43.89 m" |
Which Barrel twist has a Stock of canadian 3rd generation and a Hand guards of short ribbed? | CREATE TABLE table_80142 ("Colt model no." text,"Diemaco model" text,"Stock" text,"Fire control" text,"Rear sight" text,"Forward assist" text,"Barrel length" text,"Barrel profile" text,"Barrel twist" text,"Hand guards" text,"Bayonet Lug" text,"Muzzle device" text) | SELECT "Barrel twist" FROM table_80142 WHERE "Stock" = 'canadian 3rd generation' AND "Hand guards" = 'short ribbed' |
What year was the institution of St. Catharine College founded? | CREATE TABLE table_262534_2 (founded INTEGER,institution VARCHAR) | SELECT MIN(founded) FROM table_262534_2 WHERE institution = "St. Catharine College" |
has the heart rate of patient 10624 ever less been on 09/04/last year than 75.0? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code ... | SELECT COUNT(*) > 0 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 = 10624)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d... |
Scatter. what are the staff ids and genders of all staffs whose job title is Department Manager? | CREATE TABLE Customer_Orders (order_id INTEGER,customer_id INTEGER,order_status_code VARCHAR(10),order_date DATETIME)CREATE TABLE Customers (customer_id INTEGER,payment_method_code VARCHAR(10),customer_code VARCHAR(20),customer_name VARCHAR(80),customer_address VARCHAR(255),customer_phone VARCHAR(80),customer_email VAR... | SELECT T1.staff_id, T1.staff_gender FROM Staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager" |
Are there classes in PHIL that do not meet on Friday ? | CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varch... | SELECT DISTINCT course.department, course.name, course.number 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_offering.friday = 'N' AND course.department = 'PHIL' AND semester.semester = 'WN' AND s... |
What is the average of points for 8th place with draw more than 8? | CREATE TABLE table_34478 ("Draw" real,"Artist" text,"Song" text,"Points" real,"Place" text) | SELECT AVG("Points") FROM table_34478 WHERE "Place" = '8th' AND "Draw" > '8' |
What is the total Cumulative Distance in meters that has fewer than 8 shuttles and fewer than 7 cumulative shuttles? | CREATE TABLE table_9022 ("Level" real,"Shuttles" real,"Cumulative Shuttles" real,"Speed (km/h)" real,"Shuttle Time (seconds)" real,"Total level time (s)" real,"Distance (m)" real,"Cumulative Distance (m)" real,"Cumulative Time (min and seconds)" text) | SELECT COUNT("Cumulative Distance (m)") FROM table_9022 WHERE "Shuttles" < '8' AND "Cumulative Shuttles" < '7' |
how many swimmers from china participated in the race ? | CREATE TABLE table_204_422 (id number,"rank" number,"lane" number,"name" text,"nationality" text,"time" text,"notes" text) | SELECT COUNT("name") FROM table_204_422 WHERE "nationality" = 'china' |
Visualize a scatter chart about the correlation between Team_ID and All_Games_Percent , and group by attribute ACC_Regular_Season. | 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 Team_ID, All_Games_Percent FROM basketball_match GROUP BY ACC_Regular_Season |
What player attended california university? | CREATE TABLE table_29131 ("Name" text,"Position" text,"Height" text,"Weight" real,"Age" real,"Home Town" text,"Team/School" text) | SELECT "Name" FROM table_29131 WHERE "Team/School" = 'California' |
Which Wins is the highest one that has a Year larger than 1996, and a Championship Finish of 1st, and Points smaller than 168? | CREATE TABLE table_33933 ("Year" real,"Team" text,"Wins" real,"Points" real,"Championship Finish" text) | SELECT MAX("Wins") FROM table_33933 WHERE "Year" > '1996' AND "Championship Finish" = '1st' AND "Points" < '168' |
What was the score for the episode when Jamie and John's guest was Boris Becker? | CREATE TABLE table_30960 ("Episode" text,"First broadcast" text,"Andrew and Georgies guest" text,"Jamie and Johns guest Dermot OLeary replaced Jamie Redknapp as team captain for one week in series 3,episode 8." text,"Scores" text) | SELECT "Scores" FROM table_30960 WHERE "Jamie and Johns guest Dermot OLeary replaced Jamie Redknapp as team captain for one week in series 3, episode 8." = 'Boris Becker' |
What are the average points that have december 27? | CREATE TABLE table_name_36 (points INTEGER,december VARCHAR) | SELECT AVG(points) FROM table_name_36 WHERE december = 27 |
What was the report when the average speed (mph) was 87.599? | CREATE TABLE table_2490 ("Year" real,"Date" text,"Driver" text,"Team" text,"Manufacturer" text,"Laps" text,"Miles (km)" text,"Race Time" text,"Average Speed (mph)" text,"Report" text) | SELECT "Report" FROM table_2490 WHERE "Average Speed (mph)" = '87.599' |
What is the Region of the 1766390 Catalog? | CREATE TABLE table_75925 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Region" FROM table_75925 WHERE "Catalog" = '1766390' |
how many of the male patients were treated with fluc100? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.formulary_drug_cd = "FLUC100" |
What is the total number of 1876(s), when 1872 is less than 1921, and when 1891 is less than 354? | CREATE TABLE table_42562 ("1861" real,"1866" real,"1872" real,"1876" real,"1881" real,"1886" real,"1891" real) | SELECT COUNT("1876") FROM table_42562 WHERE "1872" < '1921' AND "1891" < '354' |
What is Name, when Bonus is greater than 1, when Only Point is greater than 7, and when Total Point is less than 21? | CREATE TABLE table_name_10 (name VARCHAR,total_point VARCHAR,bonus VARCHAR,only_point VARCHAR) | SELECT name FROM table_name_10 WHERE bonus > 1 AND only_point > 7 AND total_point < 21 |
return me the domain where ' H. V. Jagadish ' is focused . | CREATE TABLE domain_keyword (did int,kid int)CREATE TABLE domain (did int,name varchar)CREATE TABLE publication (abstract varchar,cid int,citation_num int,jid int,pid int,reference_num int,title varchar,year int)CREATE TABLE journal (homepage varchar,jid int,name varchar)CREATE TABLE author (aid int,homepage varchar,na... | SELECT domain.name FROM author, domain, domain_author WHERE author.name = 'H. V. Jagadish' AND domain_author.aid = author.aid AND domain.did = domain_author.did |
Which Goals Against has a Drawn larger than 9, a Lost larger than 15, a Position of 24, and a Played smaller than 46? | CREATE TABLE table_name_50 (goals_against INTEGER,played VARCHAR,position VARCHAR,drawn VARCHAR,lost VARCHAR) | SELECT AVG(goals_against) FROM table_name_50 WHERE drawn > 9 AND lost > 15 AND position = 24 AND played < 46 |
Most edited posts per user. Shows the edited posts by user | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score n... | SELECT Posts.Id AS "post_link", Posts.Score, SUM(CASE PostHistory.PostHistoryTypeId WHEN 5 THEN 1 ELSE 0 END) AS Edits, Posts.CommunityOwnedDate AS Wiki FROM Posts LEFT JOIN PostHistory ON Posts.Id = PostHistory.PostId WHERE Posts.OwnerUserId = '##UserID:int##' GROUP BY Posts.Id, Posts.CommunityOwnedDate, Posts.Score O... |
Show me a bar chart for how many total credits are offered by each department?, and order by the names from low to high. | CREATE TABLE teaches (ID varchar(5),course_id varchar(8),sec_id varchar(8),semester varchar(6),year numeric(4,0))CREATE TABLE section (course_id varchar(8),sec_id varchar(8),semester varchar(6),year numeric(4,0),building varchar(15),room_number varchar(7),time_slot_id varchar(4))CREATE TABLE instructor (ID varchar(5),n... | SELECT dept_name, SUM(credits) FROM course GROUP BY dept_name ORDER BY dept_name |
Name the league for paul paton | CREATE TABLE table_1725 ("Player" text,"League" real,"Scottish Cup" real,"League Cup" real,"Challenge Cup" real,"Total" real) | SELECT "League" FROM table_1725 WHERE "Player" = 'Paul Paton' |
What is the date of birth and age of Gabriel Quak Jun Yi with 3 caps? | CREATE TABLE table_name_57 (date_of_birth__age_ VARCHAR,caps VARCHAR,name VARCHAR) | SELECT date_of_birth__age_ FROM table_name_57 WHERE caps = "3" AND name = "gabriel quak jun yi" |
what is average age of patients whose gender is m and age is greater than or equal to 24? | 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 AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.age >= "24" |
name the player for number 5 | CREATE TABLE table_23670057_1 (player VARCHAR,no VARCHAR) | SELECT player FROM table_23670057_1 WHERE no = 5 |
How many people were in the crowd when the away team scored 17.17 (119)? | CREATE TABLE table_51213 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT SUM("Crowd") FROM table_51213 WHERE "Away team score" = '17.17 (119)' |
How many papers written on ImageNet ? | CREATE TABLE field (fieldid int)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE writes (paperid int,authorid int)CREATE TABLE ve... | SELECT DISTINCT COUNT(DISTINCT paper.paperid) FROM dataset, paper, paperdataset WHERE dataset.datasetname LIKE 'ImageNet' AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid |
provide the number of patients whose diagnoses short title is abn react-surg proc nec and lab test fluid is cerebrospinal fluid (csf)? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Abn react-surg proc NEC" AND lab.fluid = "Cerebrospinal Fluid (CSF)" |
At a longitude of 293.0e, what is the diameter, in km? | CREATE TABLE table_16799784_9 (diameter__km_ VARCHAR,longitude VARCHAR) | SELECT diameter__km_ FROM table_16799784_9 WHERE longitude = "293.0E" |
What cities do students live in? | CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE has_allergy (stuid number,allergy text)CREATE TABLE allergy_type (allergy text,allergytype text) | SELECT DISTINCT city_code FROM student |
What is every value for %yes when type is ref? | CREATE TABLE table_3355 ("meas. num." real,"passed" text,"YES votes" real,"NO votes" real,"% YES" text,"Const. Amd.?" text,"type" text,"description" text) | SELECT "% YES" FROM table_3355 WHERE "type" = 'Ref' |
who won the kansas state game on 11/26/1988 | CREATE TABLE table_15740666_6 (kansas_state_vs VARCHAR,last_meeting VARCHAR) | SELECT kansas_state_vs FROM table_15740666_6 WHERE last_meeting = "11/26/1988" |
For those employees who was hired before 2002-06-21, show me about the distribution of job_id and the sum of department_id , and group by attribute job_id in a bar chart. | CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID ... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID |
had patient 015-20584 undergone a normal saline solution - moderate volume resuscitation (150-250 mls/hr) procedure at any other hospital? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,l... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '015-20584' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '015-20584' AND patient.hospitaldischargetime IS NULL)) AND tr... |
provide the number of patients whose age is less than 51 and drug code is senn5l? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "51" AND prescriptions.formulary_drug_cd = "SENN5L" |
what's the date of birth with # being 2 | CREATE TABLE table_17438 ("#" real,"President" text,"Date of birth" text,"Date of inauguration" text,"Age at inauguration" text,"End of term" text,"Length of retirement" text,"Date of death" text,"Lifespan" text) | SELECT "Date of birth" FROM table_17438 WHERE "#" = '2' |
What is the number of each allergie type that the student with first name Lisa has? Visualize by bar chart, display bar in asc order. | 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 AllergyType, COUNT(AllergyType) FROM Allergy_Type AS T1 JOIN Has_Allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" GROUP BY AllergyType ORDER BY AllergyType |
What is the 2nd leg that Team 1 is Union Berlin? | CREATE TABLE table_name_46 (team_1 VARCHAR) | SELECT 2 AS nd_leg FROM table_name_46 WHERE team_1 = "union berlin" |
How many people named Nick Lucas are on the show? | CREATE TABLE table_17676 ("Character" text,"Portrayed by" text,"Main cast seasons" text,"Recurring cast seasons" text,"# of episodes" real) | SELECT COUNT("Portrayed by") FROM table_17676 WHERE "Character" = 'Nick Lucas' |
show me the flights from BOSTON to SAN FRANCISCO on UA | CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_speed int,range_miles int,pressurized varchar)CREATE TABLE date_day (month_number int,... | 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... |
What the average amount of field goals Clark has if he has less than 3 touch downs and less than 5 points? | CREATE TABLE table_name_25 (field_goals INTEGER,points VARCHAR,touchdowns VARCHAR,player VARCHAR) | SELECT AVG(field_goals) FROM table_name_25 WHERE touchdowns < 3 AND player = "clark" AND points < 5 |
How many points did the home score at a game that had their opponents scoring 12.16 (88)? | CREATE TABLE table_52058 ("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_52058 WHERE "Away team score" = '12.16 (88)' |
in which season the position was center | CREATE TABLE table_23407 ("Season" text,"Player" text,"Junior college" text,"State" text,"Position" text,"Class" text,"University" text) | SELECT "Season" FROM table_23407 WHERE "Position" = 'Center' |
What pick was the player from Apopka, FL in the 2002 MLB draft | CREATE TABLE table_17068 ("Player" text,"Position" text,"School" text,"Hometown" text,"MLB Draft" text) | SELECT "MLB Draft" FROM table_17068 WHERE "Hometown" = 'Apopka, FL' |
what is the average season when results is less than 2 times in 2nd and more than 6 times in 3rd? | CREATE TABLE table_70686 ("Season" real,"Champion" text,"Motorcycle" text,"Wins" real,"2nd pl." real,"3rd pl." real,"Team" text) | SELECT AVG("Season") FROM table_70686 WHERE "2nd pl." < '2' AND "3rd pl." > '6' |
What is the boat builder for a boat built in 1994 and a number greater than 93? | CREATE TABLE table_name_76 (boat_builder VARCHAR,number VARCHAR,year_built VARCHAR) | SELECT boat_builder FROM table_name_76 WHERE number > 93 AND year_built = "1994" |
how many patients born before 2087 were ordered urine lab test? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2087" AND lab.fluid = "Urine" |
Which Jersey # has a Height (cm) of 183, a Name of paul stastny, and a Weight (kg) smaller than 93? | CREATE TABLE table_43245 ("Position" text,"Jersey #" real,"Name" text,"Height (cm)" real,"Weight (kg)" real,"Birthdate" text,"Birthplace" text,"2006\u20132007 Team" text) | SELECT COUNT("Jersey #") FROM table_43245 WHERE "Height (cm)" = '183' AND "Name" = 'paul stastny' AND "Weight (kg)" < '93' |
Which Player has a Score of 67-72-71-75=285? | CREATE TABLE table_name_22 (player VARCHAR,score VARCHAR) | SELECT player FROM table_name_22 WHERE score = 67 - 72 - 71 - 75 = 285 |
Which substrate has an OMIM of 176000? | CREATE TABLE table_name_47 (substrate VARCHAR,omim VARCHAR) | SELECT substrate FROM table_name_47 WHERE omim = 176000 |
What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken? | CREATE TABLE customer (cust_id text,cust_name text,acc_type text,acc_bal number,no_of_loans number,credit_score number,branch_id number,state text)CREATE TABLE loan (loan_id text,loan_type text,cust_id text,branch_id text,amount number)CREATE TABLE bank (branch_id number,bname text,no_of_customers number,city text,stat... | SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) |
How many cup goals for the season with more than 34 league apps? | CREATE TABLE table_32377 ("Season" text,"Team" text,"League Apps" real,"League Goals" real,"Cup Apps" real,"Cup Goals" real) | SELECT AVG("Cup Goals") FROM table_32377 WHERE "League Apps" > '34' |
What was the sum of the ranks for Japan who had less than 5 bronze medals and more than 3 silvers? | CREATE TABLE table_77030 ("Rank" real,"Country" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Rank") FROM table_77030 WHERE "Bronze" < '5' AND "Country" = 'japan' AND "Silver" > '3' |
How many ranks have a rebound average smaller than 6.1? | CREATE TABLE table_name_27 (rank VARCHAR,reb_avg INTEGER) | SELECT COUNT(rank) FROM table_name_27 WHERE reb_avg < 6.1 |
Calculate the maximum age of patients with overdose primary disease who had an emergency hospital admission. | 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 MAX(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "OVERDOSE" |
What is the Yam amount when the Maze/Corn amount is 1355? | CREATE TABLE table_4512 ("STAPLE:" text,"Maize / Corn [A ]" text,"Rice [B ]" text,"Wheat [C ]" text,"Potato [D ]" text,"Cassava [E ]" text,"Soybean (Green) [F ]" text,"Sweet potato [G ]" text,"Yam [Y ]" text) | SELECT "Yam [Y ]" FROM table_4512 WHERE "Maize / Corn [A ]" = '1355' |
Name the bus width bits when bandwidth mb/s is 3200 | CREATE TABLE table_19202 ("Designation" text,"Bus width (bits)" real,"Channels" text,"Clock rate (MHz)" real,"Bandwidth (MB/s)" real) | SELECT "Bus width (bits)" FROM table_19202 WHERE "Bandwidth (MB/s)" = '3200' |
How many top 10 finishes did Ken Bouchard get in the year he won $17,695? | CREATE TABLE table_25976 ("Year" real,"Starts" real,"Wins" real,"Top 10" real,"Poles" real,"Avg. Start" text,"Avg. Finish" text,"Winnings" text,"Position" text,"Team(s)" text) | SELECT "Top 10" FROM table_25976 WHERE "Winnings" = '$17,695' |
What was the average attendance on october 3, 1976? | CREATE TABLE table_9682 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT AVG("Attendance") FROM table_9682 WHERE "Date" = 'october 3, 1976' |
what organism has been found in the first mini-bal exam of patient 31854 during this hospital encounter? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime ti... | SELECT microbiologyevents.org_name FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854 AND admissions.dischtime IS NULL) AND microbiologyevents.spec_type_desc = 'mini-bal' AND NOT microbiologyevents.org_name IS NULL ORDER BY microbio... |
Show the number of documents for different budget type description in a bar chart. | CREATE TABLE Documents_with_Expenses (Document_ID INTEGER,Budget_Type_Code CHAR(15),Document_Details VARCHAR(255))CREATE TABLE Statements (Statement_ID INTEGER,Statement_Details VARCHAR(255))CREATE TABLE Ref_Document_Types (Document_Type_Code CHAR(15),Document_Type_Name VARCHAR(255),Document_Type_Description VARCHAR(25... | SELECT Budget_Type_Description, COUNT(Budget_Type_Description) FROM Documents_with_Expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_Code = T2.Budget_Type_Code GROUP BY Budget_Type_Description |
What role did John Wayne play in The Trail Beyond, directed by R.N. Bradbury? | CREATE TABLE table_67264 ("Title" text,"Studio" text,"Role" text,"Leading lady" text,"Director" text) | SELECT "Role" FROM table_67264 WHERE "Director" = 'r.n. bradbury' AND "Title" = 'the trail beyond' |
Name the nickname for enrollment being 9000 | CREATE TABLE table_1974545_1 (nickname VARCHAR,enrollment VARCHAR) | SELECT nickname FROM table_1974545_1 WHERE enrollment = 9000 |
What are the number of the purchase details of transactions with amount bigger than 10000?, rank by the the number of purchase details from high to low. | CREATE TABLE Transactions (transaction_id INTEGER,investor_id INTEGER,transaction_type_code VARCHAR(10),date_of_transaction DATETIME,amount_of_transaction DECIMAL(19,4),share_count VARCHAR(40),other_details VARCHAR(255))CREATE TABLE Investors (investor_id INTEGER,Investor_details VARCHAR(255))CREATE TABLE Purchases (pu... | SELECT purchase_details, COUNT(purchase_details) FROM Purchases AS T1 JOIN Transactions AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 GROUP BY purchase_details ORDER BY COUNT(purchase_details) DESC |
What is the score for set 2 when the score of set 1 is 19 25? | CREATE TABLE table_49823 ("Date" text,"Time" text,"Score" text,"Set 1" text,"Set 2" text,"Set 3" text,"Total" text) | SELECT "Set 2" FROM table_49823 WHERE "Set 1" = '19–25' |
What is every value for rushing yards per game if sacks if 25? | CREATE TABLE table_27487336_1 (rushing_yards_per_game VARCHAR,sacks VARCHAR) | SELECT rushing_yards_per_game FROM table_27487336_1 WHERE sacks = "25" |
how many patients whose admission year is less than 2144 and diagnoses long title is dementia in conditions classified elsewhere without behavioral disturbance? | 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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2144" AND diagnoses.long_title = "Dementia in conditions classified elsewhere without behavioral disturbance" |
What is the title of the episode with production code ad1c07? | CREATE TABLE table_name_99 (title VARCHAR,production_code VARCHAR) | SELECT title FROM table_name_99 WHERE production_code = "ad1c07" |
what round saw wakefield trinity wildcats u21 as the opponenet at belle vue? | CREATE TABLE table_name_19 (round VARCHAR,opponent VARCHAR,venue VARCHAR) | SELECT round FROM table_name_19 WHERE opponent = "wakefield trinity wildcats u21" AND venue = "belle vue" |
provide the number of patients whose diagnoses long title is hypertrophy (benign) of prostate without urinary obstruction and other lower urinary tract symptom (luts) and lab test abnormal status is delta? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Hypertrophy (benign) of prostate without urinary obstruction and other lower urinary tract symptom (LUTS)" AND ... |
What is the date of the game located in Madison Square Garden, when the team is Seattle and the game number is less than 6? | CREATE TABLE table_48455 ("Game" real,"Date" text,"Team" text,"Score" text,"Location Attendance" text,"Record" text) | SELECT "Date" FROM table_48455 WHERE "Location Attendance" = 'madison square garden' AND "Game" < '6' AND "Team" = 'seattle' |
What is the time for Brazil? | CREATE TABLE table_name_5 (time VARCHAR,country VARCHAR) | SELECT time FROM table_name_5 WHERE country = "brazil" |
What Passenger Load Factor (%) that has a Revenue ( m) less than 958.6 and a Profit / (Loss) Before Tax ( m) of 1.1? | CREATE TABLE table_name_86 (passenger_load_factor___percentage_ VARCHAR,revenue__€m_ VARCHAR,profit____loss__before_tax__€m_ VARCHAR) | SELECT passenger_load_factor___percentage_ FROM table_name_86 WHERE revenue__€m_ < 958.6 AND profit____loss__before_tax__€m_ = "1.1" |
Top Users by Location and Technology. List of Users in a given location using a given technology.
Counts reputation only for votes on answers, ignores questions, comments, or reputation for accepted answers. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,Paren... | SELECT Users.Id AS "user_link", MAX(Users.Location) AS Location, COUNT(*) * 10 AS "technology_reputation", MAX(Users.Reputation) AS "total_reputation" FROM Votes JOIN Posts ON Votes.PostId = Posts.Id JOIN Users ON Posts.OwnerUserId = Users.Id AND Users.Id IN (SELECT Users.Id FROM Users WHERE Location LIKE ('%Romania%')... |
What are the distinct names of wines with prices higher than any wine from John Anthony winery. | CREATE TABLE wine (no number,grape text,winery text,appelation text,state text,name text,year number,price number,score number,cases number,drink text)CREATE TABLE appellations (no number,appelation text,county text,state text,area text,isava text)CREATE TABLE grapes (id number,grape text,color text) | SELECT DISTINCT name FROM wine WHERE price > (SELECT MIN(price) FROM wine WHERE winery = "John Anthony") |
When did the season premiere that had a viewer rank of #6? | CREATE TABLE table_61169 ("Season" real,"Season premiere" text,"Season finale" text,"TV season" text,"Viewer rank (#)" text,"Households/Viewers (in millions)" real) | SELECT "Season premiere" FROM table_61169 WHERE "Viewer rank (#)" = '#6' |
What was the score of the game when the record was 22 46? | CREATE TABLE table_72035 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text) | SELECT "Score" FROM table_72035 WHERE "Record" = '22–46' |
when did patient 7476 come to the hospital via emergency room admit, the last time during the previous year? | CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE chartevents (row_i... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 7476 AND admissions.admission_location = 'emergency room admit' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime DESC LIMIT 1 |
what is the rank of the cinema when the number of sites is more than 62 and the circuit is cineplex entertainment? | CREATE TABLE table_name_3 (rank INTEGER,sites VARCHAR,circuit VARCHAR) | SELECT SUM(rank) FROM table_name_3 WHERE sites > 62 AND circuit = "cineplex entertainment" |
meet the sepsis alert criterion ( hypotension ( sbp < 90 after 2 l of fluids or lactate >= 4 ) or piro ( predispose, infection, response, organ dysfunction ) score >= 15 . | CREATE TABLE table_train_68 ("id" int,"sequential_organ_failure_assessment_sofa" int,"pregnancy_or_lactation" bool,"piro_predispose_infection_response_organ_dysfunction_score" int,"systolic_blood_pressure_sbp" int,"hypotension" bool,"age" float,"lactate" int,"NOUSE" float) | SELECT * FROM table_train_68 WHERE (hypotension = 1 OR systolic_blood_pressure_sbp < 90 OR lactate >= 4) OR piro_predispose_infection_response_organ_dysfunction_score >= 15 |
Name the circuit with class of gts | CREATE TABLE table_5061 ("Race" text,"Length" text,"Class" text,"Circuit" text,"Date" text) | SELECT "Circuit" FROM table_5061 WHERE "Class" = 'gts' |
What is the Date of Tie no 21? | CREATE TABLE table_name_13 (date VARCHAR,tie_no VARCHAR) | SELECT date FROM table_name_13 WHERE tie_no = "21" |
What year had Nintendo EAD, Monolith Soft as developers? | CREATE TABLE table_63663 ("Year" real,"Game" text,"Genre" text,"Platform(s)" text,"Developer(s)" text) | SELECT SUM("Year") FROM table_63663 WHERE "Developer(s)" = 'nintendo ead, monolith soft' |
Who were the performance liaisons for the dramaturge Chrisena Ricci? | CREATE TABLE table_22410780_1 (performance_liaison VARCHAR,dramaturge VARCHAR) | SELECT performance_liaison FROM table_22410780_1 WHERE dramaturge = "Chrisena Ricci" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.