instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
how many teams finished below 3 minutes and 3 seconds ? | CREATE TABLE table_203_160 (id number,"rank" number,"heat" number,"nation" text,"competitors" text,"time" text,"notes" text) | SELECT COUNT("nation") FROM table_203_160 WHERE "time" < 3 OR ("time" = 3 AND "time" < 3) |
in 1953, which of the institutions joined? | CREATE TABLE table_73899 ("Institution" text,"Location" text,"Nickname" text,"Founded" real,"Type" text,"Enrollment" real,"Joined" text) | SELECT "Institution" FROM table_73899 WHERE "Joined" = '1953' |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of email and department_id , and order by the bar from low to high please. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTME... | SELECT EMAIL, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL |
What is Tournament, when 2003 is 'A'? | CREATE TABLE table_60455 ("Tournament" text,"2001" text,"2002" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text,"2013" text) | SELECT "Tournament" FROM table_60455 WHERE "2003" = 'a' |
Tell me the player for round more than 5 and position of c | CREATE TABLE table_name_25 (player VARCHAR,round VARCHAR,position VARCHAR) | SELECT player FROM table_name_25 WHERE round > 5 AND position = "c" |
What are all the results where Robert Bauman is the incumbent politician? | CREATE TABLE table_1341690_20 (result VARCHAR,incumbent VARCHAR) | SELECT result FROM table_1341690_20 WHERE incumbent = "Robert Bauman" |
What year has a Nominee of , and a Result of nominated? | CREATE TABLE table_name_14 (year INTEGER,nominee VARCHAR,result VARCHAR) | SELECT AVG(year) FROM table_name_14 WHERE nominee = "—" AND result = "nominated" |
allergy to glyburide; | CREATE TABLE table_train_182 ("id" int,"allergy_to_sulfa" bool,"creatinine_clearance_cl" float,"liver_disease" bool,"allergy_to_glyburide" bool,"allergy_to_metformin" bool,"NOUSE" float) | SELECT * FROM table_train_182 WHERE allergy_to_glyburide = 1 |
What country did Chris Witty represent? | CREATE TABLE table_9221 ("Event" text,"Time" text,"Name" text,"Nation" text,"Games" text,"Date" text) | SELECT "Nation" FROM table_9221 WHERE "Name" = 'chris witty' |
in what year did bend or win his first race ? | CREATE TABLE table_203_584 (id number,"date" text,"race name" text,"d(f)" number,"course" text,"prize (\u00a3)" number,"odds" text,"runners" number,"place" number,"margin" number,"winner/runner-up" text,"time" text,"jockey" text) | SELECT MIN("date") FROM table_203_584 WHERE "place" = 1 |
What is the highest silver total for nations with 3 total and over 2 bronze? | CREATE TABLE table_name_47 (silver INTEGER,total VARCHAR,bronze VARCHAR) | SELECT MAX(silver) FROM table_name_47 WHERE total = 3 AND bronze > 2 |
What is the average Tier when the postseason shows -, and the season is 2012 13? | CREATE TABLE table_name_56 (tier INTEGER,postseason VARCHAR,season VARCHAR) | SELECT AVG(tier) FROM table_name_56 WHERE postseason = "–" AND season = "2012–13" |
what are the top three most frequent microbiology tests administered to patients during the same month after undergoing peripheral nerve graft during the previous year? | 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 d_icd_procedures (row_id number,icd9_code text,short_title text,long_tit... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... |
Where did McCain get 20226 votes? | CREATE TABLE table_23674 ("County" text,"Obama%" text,"Obama#" real,"McCain%" text,"McCain#" real,"Total" real) | SELECT "County" FROM table_23674 WHERE "McCain#" = '20226' |
Who was the outgoing manager when the incoming manager was jo o pereira? | CREATE TABLE table_22006 ("Team" text,"Outgoing manage" text,"Manner" text,"Date of vacancy" text,"Incoming manager" text,"Date of appointment" text) | SELECT "Outgoing manage" FROM table_22006 WHERE "Incoming manager" = 'João Pereira' |
When the opponent was Yan Zi Jie Zheng, what was the outcome? | CREATE TABLE table_27425 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text) | SELECT "Outcome" FROM table_27425 WHERE "Opponents" = 'Yan Zi Jie Zheng' |
What is Score, when Away Team is 'Newcastle Benfield'? | CREATE TABLE table_name_18 (score VARCHAR,away_team VARCHAR) | SELECT score FROM table_name_18 WHERE away_team = "newcastle benfield" |
which element was observed or predicted in 1771 by w.scheele ? | CREATE TABLE table_202_158 (id number,"z" number,"element" text,"observed or predicted" text,"isolated (widely known)" number,"observer" text,"first isolator" text,"notes" text) | SELECT "element" FROM table_202_158 WHERE "observed or predicted" = 1771 AND "observer" = 'w. scheele' |
Name the points against for november 7 | CREATE TABLE table_20179 ("Week" real,"Date" text,"Result" text,"Record" text,"Opponent" text,"Points For" real,"Points Against" real,"First Downs" real,"Attendance" real) | SELECT "Points Against" FROM table_20179 WHERE "Date" = 'November 7' |
What was the Overall number that is the lowest, and has a pick greater than 9? | CREATE TABLE table_49670 ("Round" real,"Pick" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT MIN("Overall") FROM table_49670 WHERE "Pick" > '9' |
how many plugs in the list are not earthed ? | CREATE TABLE table_204_794 (id number,"iec\nworld plugs\nType" text,"standard" text,"power\nrating" text,"earthed" text,"polarised" text,"fused" text,"insulated\npins" text,"europlug\ncompatible" text) | SELECT COUNT(*) FROM table_204_794 WHERE "earthed" = 'no' |
Who did the cubs play on june 3? | CREATE TABLE table_name_60 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_60 WHERE date = "june 3" |
Group by the result and count them by a bar chart, and list by the x-axis from low to high. | CREATE TABLE Acceptance (Submission_ID int,Workshop_ID int,Result text)CREATE TABLE workshop (Workshop_ID int,Date text,Venue text,Name text)CREATE TABLE submission (Submission_ID int,Scores real,Author text,College text) | SELECT Result, COUNT(Result) FROM Acceptance GROUP BY Result ORDER BY Result |
What is the time from the song called Treat Me Nice? | CREATE TABLE table_54407 ("Track" real,"Recorded" text,"Catalogue" text,"Release Date" text,"Chart Peak" text,"Song Title" text,"Time" text) | SELECT "Time" FROM table_54407 WHERE "Song Title" = 'treat me nice' |
what are all the circuit for gtc winner graeme mundy jamie smyth and pole position bradley ellis alex mortimer | CREATE TABLE table_13079788_3 (circuit VARCHAR,gtc_winner VARCHAR,pole_position VARCHAR) | SELECT circuit FROM table_13079788_3 WHERE gtc_winner = "Graeme Mundy Jamie Smyth" AND pole_position = "Bradley Ellis Alex Mortimer" |
calculate the number of times that patient 025-57841 had a p.o. intake until 01/30/2105. | 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 COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-57841')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.ce... |
Top 20 Users from bangalore. | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE Comment... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%bengaluru%' OR LOWER(Location) LIKE '%bengalore%' ORDER BY Reputation DESC LIMIT 20 |
Show the number of competitions held in each city with a bar chart, and rank x axis in ascending order. | CREATE TABLE competition_record (Competition_ID int,Farm_ID int,Rank int)CREATE TABLE farm (Farm_ID int,Year int,Total_Horses real,Working_Horses real,Total_Cattle real,Oxen real,Bulls real,Cows real,Pigs real,Sheep_and_Goats real)CREATE TABLE city (City_ID int,Official_Name text,Status text,Area_km_2 real,Population r... | SELECT Official_Name, COUNT(Official_Name) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY Official_Name ORDER BY Official_Name |
How many years where Eichst dt had a number of 939? | CREATE TABLE table_11680175_1 (year VARCHAR,eichstädt VARCHAR) | SELECT COUNT(year) FROM table_11680175_1 WHERE eichstädt = 939 |
Name the outgoing manager for 10 june 2009 | CREATE TABLE table_22848931_3 (outgoing_manager VARCHAR,date_of_vacancy VARCHAR) | SELECT COUNT(outgoing_manager) FROM table_22848931_3 WHERE date_of_vacancy = "10 June 2009" |
Which team has george graham as the manager? | CREATE TABLE table_80387 ("Team" text,"Manager" text,"Captain" text,"Kit manufacturer" text,"Shirt sponsor" text) | SELECT "Team" FROM table_80387 WHERE "Manager" = 'george graham' |
What's the unit of measure used for the product commodity code PO? | CREATE TABLE sampledata15 (sample_pk number,state text,year text,month text,day text,site text,commod text,source_id text,variety text,origin text,country text,disttype text,commtype text,claim text,quantity number,growst text,packst text,distst text)CREATE TABLE resultsdata15 (sample_pk number,commod text,commtype tex... | SELECT conunit FROM resultsdata15 WHERE commod = "PO" |
what is average age of patients whose days of hospital stay is 11 and year of death is less than 2155? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.days_stay = "11" AND demographic.dod_year < "2155.0" |
show me flights from PITTSBURGH to PHILADELPHIA | CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE state (state_cod... | 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHI... |
Who was the partner for the tournament in Lyon, France? | CREATE TABLE table_44145 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Partnering" text,"Opponent" text,"Score" text) | SELECT "Partnering" FROM table_44145 WHERE "Tournament" = 'lyon, france' |
What is the rank for the 96 floors? | CREATE TABLE table_name_75 (rank VARCHAR,floors VARCHAR) | SELECT rank FROM table_name_75 WHERE floors = "96" |
What's the oil rig of the song with a draw number 9? | CREATE TABLE table_20183474_1 (oil_rig INTEGER,draw VARCHAR) | SELECT MIN(oil_rig) FROM table_20183474_1 WHERE draw = 9 |
Which class had a quantity made of 20? | CREATE TABLE table_79274 ("Class" text,"Wheel arrangement" text,"Fleet number(s)" text,"Manufacturer" text,"Year made" text,"Quantity made" text,"Quantity preserved" text,"Year(s) retired" text) | SELECT "Class" FROM table_79274 WHERE "Quantity made" = '20' |
What was the final score of the game on October 4, 1970? | CREATE TABLE table_14966537_1 (result VARCHAR,date VARCHAR) | SELECT result FROM table_14966537_1 WHERE date = "October 4, 1970" |
Show all the distinct president votes made on 08/30/2015. | CREATE TABLE voting_record (stuid number,registration_date text,election_cycle text,president_vote number,vice_president_vote number,secretary_vote number,treasurer_vote number,class_president_vote number,class_senator_vote number)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number... | SELECT DISTINCT president_vote FROM voting_record WHERE registration_date = "08/30/2015" |
how many patients with iv drip route of drug administration have diagnosis icd9 code v4281? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "V4281" AND prescriptions.route = "IV DRIP" |
For each county, find the name of the county and the number of delegates from that county. Show the proportion. | CREATE TABLE election (Election_ID int,Counties_Represented text,District int,Delegate text,Party int,First_Elected real,Committee text)CREATE TABLE county (County_Id int,County_name text,Population real,Zip_code text)CREATE TABLE party (Party_ID int,Year real,Party text,Governor text,Lieutenant_Governor text,Comptroll... | SELECT County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_Id = T2.District GROUP BY T1.County_Id |
Which Record has a Match Report of recap, and a Result of l 30 20? | CREATE TABLE table_5946 ("Week" text,"Date" text,"Opponent" text,"Result" text,"Kickoff" text,"Game site" text,"Record" text,"Match Report" text) | SELECT "Record" FROM table_5946 WHERE "Match Report" = 'recap' AND "Result" = 'l 30–20' |
Rank User By Number of Upvotes. | 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 Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewTaskResults (Id ... | SELECT 'user_link', UpVotes, DownVotes, rn FROM (SELECT a.Id AS "user_link", a.DownVotes, UpVotes, DENSE_RANK() OVER (ORDER BY a.UpVotes DESC) AS rn FROM Users AS a) AS x WHERE rn <= '##NumberOfUser##' AND DownVotes = 0 ORDER BY UpVotes DESC |
What's the smallest amount of Laps that had a finish of 7 with a start of 6? | CREATE TABLE table_name_49 (laps INTEGER,finish VARCHAR,start VARCHAR) | SELECT MIN(laps) FROM table_name_49 WHERE finish = "7" AND start = "6" |
What Time has Date of May 9? | CREATE TABLE table_name_84 (time VARCHAR,date VARCHAR) | SELECT time FROM table_name_84 WHERE date = "may 9" |
how much is the maximum hospital bill that includes hypertension - uncontrolled since 2102? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,disch... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'hypertension - uncontrolled')) AND STRFTIME(... |
What was the weight in kg when the horse was Alcopop? | CREATE TABLE table_3165 ("Saddle cloth" real,"Horse" text,"Trainer" text,"Jockey" text,"Weight (kg)" text,"Barrier [b ]" real,"Placing" text) | SELECT "Weight (kg)" FROM table_3165 WHERE "Horse" = 'Alcopop' |
Which Local authority has Services of greater anglia? | CREATE TABLE table_75342 ("Station" text,"Services" text,"Local authority" text,"Zone 2007" text,"Zone 2008" text,"Zone 2010" text,"Zone 2013" text) | SELECT "Local authority" FROM table_75342 WHERE "Services" = 'greater anglia' |
what is minimum hours of the students playing in different position? | CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0))CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0))CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3)) | SELECT pPos, MIN(T2.HS) FROM Tryout AS T1 JOIN Player AS T2 ON T1.pID = T2.pID GROUP BY pPos |
count the number of icu visits from patient 59707. | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE charteve... | SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 59707) |
What player was chosen for the Chicago Sky? | CREATE TABLE table_39651 ("Pick" real,"Player" text,"Nationality" text,"WNBA Team" text,"School/Club Team" text) | SELECT "Player" FROM table_39651 WHERE "WNBA Team" = 'chicago sky' |
List the official names of cities that have not held any competition. | CREATE TABLE city (city_id number,official_name text,status text,area_km_2 number,population number,census_ranking text)CREATE TABLE competition_record (competition_id number,farm_id number,rank number)CREATE TABLE farm_competition (competition_id number,year number,theme text,host_city_id number,hosts text)CREATE TABL... | SELECT official_name FROM city WHERE NOT city_id IN (SELECT host_city_id FROM farm_competition) |
Which College/junior/club team has a Round of 2? | CREATE TABLE table_name_11 (college_junior_club_team VARCHAR,round VARCHAR) | SELECT college_junior_club_team FROM table_name_11 WHERE round = 2 |
What 's the schedule for 736 in the Fall ? | CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE instructo... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o... |
Stacked bar of took office and how many took office colored by Minister, and display by the Y-axis in descending. | CREATE TABLE party (Party_ID int,Minister text,Took_office text,Left_office text,Region_ID int,Party_name text)CREATE TABLE member (Member_ID int,Member_Name text,Party_ID text,In_office text)CREATE TABLE region (Region_ID int,Region_name text,Date text,Label text,Format text,Catalogue text)CREATE TABLE party_events (E... | SELECT Took_office, COUNT(Took_office) FROM party GROUP BY Minister ORDER BY COUNT(Took_office) DESC |
What was the player for t9 and a score of 73-69-74=216? | CREATE TABLE table_name_97 (player VARCHAR,place VARCHAR,score VARCHAR) | SELECT player FROM table_name_97 WHERE place = "t9" AND score = 73 - 69 - 74 = 216 |
What is the Nation with a Date that is may 6, 1991? | CREATE TABLE table_42208 ("Record" text,"Athlete" text,"Nation" text,"Venue" text,"Date" text) | SELECT "Nation" FROM table_42208 WHERE "Date" = 'may 6, 1991' |
If the polling average in July 2009 was 7.2%, what was it in May 2009? | CREATE TABLE table_23680576_2 (may_2009 VARCHAR,jul_2009 VARCHAR) | SELECT may_2009 FROM table_23680576_2 WHERE jul_2009 = "7.2%" |
What was the final score for the game in which Carmelo Anthony (26) was the high points scorer? | CREATE TABLE table_name_78 (score VARCHAR,high_points VARCHAR) | SELECT score FROM table_name_78 WHERE high_points = "carmelo anthony (26)" |
Show all distinct lot details. | CREATE TABLE LOTS (lot_details VARCHAR) | SELECT DISTINCT lot_details FROM LOTS |
What is the average number of silver medals for rank 2 and more than 1 bronze medal? | CREATE TABLE table_10893 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Silver") FROM table_10893 WHERE "Rank" = '2' AND "Bronze" > '1' |
Who wrote episode number 109 in the series? | CREATE TABLE table_26565936_2 (written_by VARCHAR,no_in_series VARCHAR) | SELECT written_by FROM table_26565936_2 WHERE no_in_series = 109 |
What was the Position of the Player, Britton Johnsen? | CREATE TABLE table_76100 ("Player" text,"Nationality" text,"Position" text,"Years in Orlando" text,"School/Club Team" text) | SELECT "Position" FROM table_76100 WHERE "Player" = 'britton johnsen' |
What is the group A region with a region number of 2? | CREATE TABLE table_name_20 (group_a VARCHAR,region VARCHAR) | SELECT group_a FROM table_name_20 WHERE region = 2 |
What is the NCBI Accession Number (mRNA/Protein) for the homo sapiens Species? | CREATE TABLE table_7844 ("Species" text,"Species common name" text,"NCBI Accession Number (mRNA/Protein)" text,"Length (bp/aa)" text,"Protein Identity" text) | SELECT "NCBI Accession Number (mRNA/Protein)" FROM table_7844 WHERE "Species" = 'homo sapiens' |
Which year did USA undergo a disaster? | CREATE TABLE table_78291 ("Disaster" text,"Year" text,"Countries Affected" text,"Scale of Disaster" text,"People Assisted" text,"Nature of Help" text) | SELECT "Year" FROM table_78291 WHERE "Countries Affected" = 'usa' |
List the number of long range shors where the score is 171. | CREATE TABLE table_24906653_5 (field_goals VARCHAR,points VARCHAR) | SELECT COUNT(field_goals) FROM table_24906653_5 WHERE points = 171 |
Which venue hosted the Dixie Derby Girls? | CREATE TABLE table_name_68 (venue VARCHAR,club VARCHAR) | SELECT venue FROM table_name_68 WHERE club = "dixie derby girls" |
Which theme has a Episode of top 6? | CREATE TABLE table_69352 ("Episode" text,"Theme" text,"Song choice" text,"Original artist" text,"Order #" text,"Result" text) | SELECT "Theme" FROM table_69352 WHERE "Episode" = 'top 6' |
Tell me the lowest placings for United Kingdom and rank less than 13 | CREATE TABLE table_57158 ("Rank" real,"Name" text,"Nation" text,"Points" real,"Placings" real) | SELECT MIN("Placings") FROM table_57158 WHERE "Nation" = 'united kingdom' AND "Rank" < '13' |
Top questions for a TAG. | 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 CONCAT('https://stackoverflow.com/questions/', Id), AcceptedAnswerId, CreationDate AS Score, ViewCount, FavoriteCount, Title, Tags, AnswerCount, CommentCount, Body, OwnerUserId, LastEditDate FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%<##TagName##>%' ORDER BY ViewCount DESC LIMIT 50 |
What's Australia's time in the heat more than 4? | CREATE TABLE table_name_43 (time VARCHAR,heat VARCHAR,nationality VARCHAR) | SELECT time FROM table_name_43 WHERE heat > 4 AND nationality = "australia" |
What's the total wins for Wentworth with less than 0 byes? | CREATE TABLE table_63247 ("Sunrayia FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real) | SELECT COUNT("Wins") FROM table_63247 WHERE "Sunrayia FL" = 'wentworth' AND "Byes" < '0' |
count the number of newborn admission patients who have more than 10 days of hospital stay. | 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.admission_type = "NEWBORN" AND demographic.days_stay > "10" |
Find the names of rooms that have been reserved for more than 60 times. | CREATE TABLE Reservations (Room VARCHAR)CREATE TABLE Rooms (roomName VARCHAR,RoomId VARCHAR) | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING COUNT(*) > 60 |
What was the score in the game that had a record of 25-8? | CREATE TABLE table_22685 ("Game" real,"Date" text,"Opponent" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location" text,"Record" text) | SELECT "Score" FROM table_22685 WHERE "Record" = '25-8' |
Which Filename extension has a Word wrap support of yes, an Open standard of no, and an Interactivity support of yes? | CREATE TABLE table_name_26 (filename_extension VARCHAR,interactivity_support VARCHAR,word_wrap_support VARCHAR,open_standard VARCHAR) | SELECT filename_extension FROM table_name_26 WHERE word_wrap_support = "yes" AND open_standard = "no" AND interactivity_support = "yes" |
provide the number of patients whose year of birth is less than 2098 and drug route is id? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2098" AND prescriptions.route = "ID" |
What is the 2003 value with a 1r in 1998, a 14 in 1994, and a 7-12 career? | CREATE TABLE table_name_50 (career VARCHAR) | SELECT 2003 FROM table_name_50 WHERE 1998 = "1r" AND 1994 = "1r" AND career = "7-12" |
what is the number of patients whose admission type is newborn and drug route is ed? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "NEWBORN" AND prescriptions.route = "ED" |
What club has more than 35 goals, more than 7 draws, and 20 losses? | CREATE TABLE table_67966 ("Position" real,"Club" text,"Played" real,"Points" text,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real) | SELECT "Club" FROM table_67966 WHERE "Goals for" > '35' AND "Draws" > '7' AND "Losses" = '20' |
how many first elected with incumbent being charles edward bennett | CREATE TABLE table_1342013_9 (first_elected VARCHAR,incumbent VARCHAR) | SELECT COUNT(first_elected) FROM table_1342013_9 WHERE incumbent = "Charles Edward Bennett" |
what was the first sailor moon episode to have an english air date in october , 1995 ? | CREATE TABLE table_203_758 (id number,"no." number,"dub no." number,"english dubbed title / english subbed title\noriginal japanese title" text,"original air date" text,"english air date" text) | SELECT "english dubbed title / english subbed title\noriginal japanese title" FROM table_203_758 WHERE "english air date" = 10 AND "english air date" = 1995 ORDER BY "english air date" LIMIT 1 |
Bar chart x axis occupation y axis how many occupation, and rank by the y-axis from low to high. | CREATE TABLE coach (Coach_ID int,Coach_name text,Gender text,Club_ID int,Rank int)CREATE TABLE player_coach (Player_ID int,Coach_ID int,Starting_year int)CREATE TABLE player (Player_ID int,Sponsor_name text,Player_name text,Gender text,Residence text,Occupation text,Votes int,Rank text)CREATE TABLE club (Club_ID int,Cl... | SELECT Occupation, COUNT(Occupation) FROM player GROUP BY Occupation ORDER BY COUNT(Occupation) |
List the number of the venues of debates in ascending order of the number of audience. | 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 Venue, COUNT(Venue) FROM debate GROUP BY Venue ORDER BY Num_of_Audience |
give me the number of patients whose days of hospital stay is greater than 16 and lab test name is sedimentation rate? | 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 lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "16" AND lab.label = "Sedimentation Rate" |
What city has the museum that holds the Sue specimen? | CREATE TABLE table_name_48 (museum VARCHAR,name VARCHAR) | SELECT museum AS city FROM table_name_48 WHERE name = "sue" |
Name the to par with money of 200,000 for australia | CREATE TABLE table_68353 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money (\u00a3)" text) | SELECT "To par" FROM table_68353 WHERE "Money ( \u00a3 )" = '200,000' AND "Country" = 'australia' |
What is the average enrollment of schools? | CREATE TABLE school_details (school_id number,nickname text,colors text,league text,class text,division text)CREATE TABLE school (school_id number,school text,location text,enrollment number,founded number,denomination text,boys_or_girls text,day_or_boarding text,year_entered_competition number,school_colors text)CREAT... | SELECT AVG(enrollment) FROM school |
Give me a bar chart that group and count names of technicians with a series of machines they are assigned to repair, and list by the total number in desc. | CREATE TABLE machine (Machine_ID int,Making_Year int,Class text,Team text,Machine_series text,value_points real,quality_rank int)CREATE TABLE repair_assignment (technician_id int,repair_ID int,Machine_ID int)CREATE TABLE repair (repair_ID int,name text,Launch_Date text,Notes text)CREATE TABLE technician (technician_id ... | SELECT Name, COUNT(Name) FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.Machine_ID = T2.Machine_ID JOIN technician AS T3 ON T1.technician_id = T3.technician_id GROUP BY Name ORDER BY COUNT(Name) DESC |
What was the final score of the game on November 24 with the visiting team the Indianapolis Colts? | CREATE TABLE table_66948 ("Date" text,"Visiting Team" text,"Final Score" text,"Host Team" text,"Stadium" text) | SELECT "Final Score" FROM table_66948 WHERE "Visiting Team" = 'indianapolis colts' AND "Date" = 'november 24' |
give me the number of patients whose age is less than 45 and drug code is glyc1r? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "45" AND prescriptions.formulary_drug_cd = "GLYC1R" |
Who was the Worship Leader for the song that was 7:05 long? | CREATE TABLE table_50429 ("Track" real,"Song" text,"Author" text,"Worship Leader" text,"Lead Supporting Vocal" text,"Time" text) | SELECT "Worship Leader" FROM table_50429 WHERE "Time" = '7:05' |
Please tell me the repeat times of each ministers using a pie chart. | CREATE TABLE party (Party_ID int,Minister text,Took_office text,Left_office text,Region_ID int,Party_name text)CREATE TABLE party_events (Event_ID int,Event_Name text,Party_ID int,Member_in_charge_ID int)CREATE TABLE region (Region_ID int,Region_name text,Date text,Label text,Format text,Catalogue text)CREATE TABLE mem... | SELECT Minister, COUNT(Minister) FROM party GROUP BY Minister |
What is the Place of Draw 1 by Artist Monika Kirovska? | CREATE TABLE table_62957 ("Draw" real,"Artist" text,"Song" text,"Percentage" text,"Place" real) | SELECT AVG("Place") FROM table_62957 WHERE "Artist" = 'monika kirovska' AND "Draw" < '1' |
Top 10 Users From Kolkata, India. | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Kolkata%' ORDER BY Reputation DESC LIMIT 10 |
What is the home team score when the away team is St Kilda? | CREATE TABLE table_name_37 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team AS score FROM table_name_37 WHERE away_team = "st kilda" |
Result of 88-85 ot (1-0) involves what game? | CREATE TABLE table_75399 ("Game" text,"Date" text,"Home Team" text,"Result" text,"Road Team" text) | SELECT "Game" FROM table_75399 WHERE "Result" = '88-85 ot (1-0)' |
Name the first elected for abner j. mikva | CREATE TABLE table_1341672_14 (first_elected VARCHAR,incumbent VARCHAR) | SELECT first_elected FROM table_1341672_14 WHERE incumbent = "Abner J. Mikva" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.