instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Who was the home team at 8:00 pm when the score was 11.18 (84)?
CREATE TABLE table_44389 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Ground" text,"Crowd" real,"Date" text,"Time" text)
SELECT "Home team" FROM table_44389 WHERE "Time" = '8:00 pm' AND "Home team score" = '11.18 (84)'
On what date was the opponent in the final Gwinyai Tongoona?
CREATE TABLE table_name_62 (date VARCHAR,opponent_in_the_final VARCHAR)
SELECT date FROM table_name_62 WHERE opponent_in_the_final = "gwinyai tongoona"
In how many different years did the race happen on February 27?
CREATE TABLE table_24988 ("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 COUNT("Year") FROM table_24988 WHERE "Date" = 'February 27'
Name the name that has moving of 1. fc n rnberg.
CREATE TABLE table_name_9 (name VARCHAR,moving_from VARCHAR)
SELECT name FROM table_name_9 WHERE moving_from = "1. fc nürnberg"
What episode number of the series aired on February 26, 1968?
CREATE TABLE table_25800134_12 (series__number VARCHAR,airdate VARCHAR)
SELECT series__number FROM table_25800134_12 WHERE airdate = "February 26, 1968"
Which Player has a Money ($) of 137, and a Score of 73-70-73-74=290?
CREATE TABLE table_61953 ("Place" text,"Player" text,"Country" text,"Score" text,"To Par" text,"Money ($)" real)
SELECT "Player" FROM table_61953 WHERE "Money ( $ )" = '137' AND "Score" = '73-70-73-74=290'
what are the three most common diagnoses since 2102 in which patients are diagnosed in the same month after being diagnosed with headache?
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 diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'headache' AND STRFTIME('%y', diagnosis.d...
Average Reputation Of SO Users where reputation > 15.
CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount nu...
SELECT AVG(Reputation) AS AVG_REP, COUNT(Id) AS "total_users" FROM Users WHERE LOWER(Location) LIKE '%manchester, united kingdom' AND Reputation > 15
what was the top five most commonly prescribed medication that patients were prescribed during the same hospital encounter after having received a int insert dual-cham dev procedure?
CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE labevents ...
SELECT t3.drug FROM (SELECT t2.drug, 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_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR...
What is the frequency of the model with part number lf80537gf0411m?
CREATE TABLE table_11602313_4 (frequency VARCHAR,part_number_s_ VARCHAR)
SELECT frequency FROM table_11602313_4 WHERE part_number_s_ = "LF80537GF0411M"
Name the high rebounds for new york
CREATE TABLE table_2686 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "High rebounds" FROM table_2686 WHERE "Team" = 'New York'
where cfl team is edmonton (2) what are all the position
CREATE TABLE table_29221 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text)
SELECT "Position" FROM table_29221 WHERE "CFL Team" = 'Edmonton (2)'
show me the last flight available in the evening from BOSTON to WASHINGTON on 7 21
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 equipment_sequen...
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, date_day, days, flight WHERE (((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND date_day.day_number = 21 AND date_day.month_number = 7 ...
are there any flights from DENVER to ATLANTA to PITTSBURGH
CREATE TABLE airline (airline_code varchar,airline_name text,note text)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,stop...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND CITY_2...
Getting number of upvotes and downvotes for each tag for a user, along with ratio. number of upvotes and downvotes i have for each tag, questions and answers combined
CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE FlagTypes ...
SELECT a.TagName AS "Tagname", a.upvotes AS "Upvotes", b.downvotes AS "Downvotes" FROM (SELECT TagName, COUNT(*) AS upvotes FROM Tags JOIN PostTags ON PostTags.TagId = Tags.Id JOIN Posts ON Posts.ParentId = PostTags.PostId OR Posts.Id = PostTags.PostId JOIN Votes ON Votes.PostId = Posts.Id AND Votes.VoteTypeId = 2 WHER...
how many patients in this year have undergone aortocor bypas-2 cor art within 2 months following the first hypothermia?
CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate ...
SELECT COUNT(DISTINCT t1.subject_id) 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 FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'hypothermia...
What are the results of Format single on March 21?
CREATE TABLE table_66859 ("Year" real,"Date" text,"Title" text,"Format(s)" text,"Award description(s)" text,"Result(s)" text)
SELECT "Result(s)" FROM table_66859 WHERE "Format(s)" = 'single' AND "Date" = 'march 21'
How many teams finished with a 2nd points total of 31?
CREATE TABLE table_21638 ("Position" real,"Team" text,"Played" real,"Won" real,"Drawn" real,"Lost" real,"Goals For" real,"Goals Against" real,"Goal Average 1" text,"Points 2" real)
SELECT COUNT("Position") FROM table_21638 WHERE "Points 2" = '31'
how many of the current patients are 50s?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid numbe...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.hospitaldischargetime IS NULL AND patient.age BETWEEN 50 AND 59
List the number of builders where the withdrawn is 1951 and number is 42.
CREATE TABLE table_25029 ("Date" text,"Builder" text,"Type" text,"Operator" text,"Number" text,"Withdrawn" text,"Status" text)
SELECT COUNT("Builder") FROM table_25029 WHERE "Withdrawn" = '1951' AND "Number" = '42'
what is the only chateau built in 1455 ?
CREATE TABLE table_204_806 (id number,"name" text,"date" text,"condition" text,"ownership\n/ access" text,"notes" text)
SELECT "name" FROM table_204_806 WHERE "date" = 1455
What week was the bye week?
CREATE TABLE table_9546 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text)
SELECT AVG("Week") FROM table_9546 WHERE "Opponent" = 'bye'
What is Rider, when Grid is less than 16, when Laps is 21, when Manufacturer is Honda, and when Time is +10.583?
CREATE TABLE table_name_67 (rider VARCHAR,time VARCHAR,manufacturer VARCHAR,grid VARCHAR,laps VARCHAR)
SELECT rider FROM table_name_67 WHERE grid < 16 AND laps = 21 AND manufacturer = "honda" AND time = "+10.583"
Who was the away team at mcg?
CREATE TABLE table_name_25 (away_team VARCHAR,venue VARCHAR)
SELECT away_team FROM table_name_25 WHERE venue = "mcg"
the most points were scored by which player ?
CREATE TABLE table_203_507 (id number,"#" text,"player" text,"\u03c3 points" number,"qual." number,"final" number)
SELECT "player" FROM table_203_507 ORDER BY "\u03c3 points" DESC LIMIT 1
What is the value of the Democratic Alternative for the poll released by Malta Today?
CREATE TABLE table_66680 ("Date(s) Released" text,"Polling institute" text,"Nationalist" text,"Labour" text,"Democratic Alternative" text,"Undecided/ No answer" text,"Lead" text)
SELECT "Democratic Alternative" FROM table_66680 WHERE "Polling institute" = 'malta today'
tell me the type and time of admission for patient ida cook.
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 lab (subject_id text,hadm_id text,itemid text,charttime tex...
SELECT demographic.admission_type, demographic.admittime FROM demographic WHERE demographic.name = "Ida Cook"
Who is the head linesman of the game on 1 February 2009?
CREATE TABLE table_38531 ("Game" text,"Date" text,"Referee" text,"Umpire" text,"Head Linesman" text,"Line Judge" text,"Field Judge" text,"Back Judge" text)
SELECT "Head Linesman" FROM table_38531 WHERE "Date" = '1 february 2009'
Name the Away team which has a Ground of waverley park, and a Home team of hawthorn?
CREATE TABLE table_77279 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Ground" text,"Crowd" real,"Date" text,"Local Time" text,"AEDT Time" text)
SELECT "Away team" FROM table_77279 WHERE "Ground" = 'waverley park' AND "Home team" = 'hawthorn'
what is the number of patients whose year of death is less than or equal to 2174 and lab test fluid is other body fluid?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2174.0" AND lab.fluid = "Other Body Fluid"
What is the Status of the dinosaur, whose notes are, 'n coelurosauria'?
CREATE TABLE table_name_73 (status VARCHAR,notes VARCHAR)
SELECT status FROM table_name_73 WHERE notes = "n coelurosauria"
When wacker burghausen is the oberbayern a what is the schwaben?
CREATE TABLE table_23224961_1 (schwaben VARCHAR,oberbayern_a VARCHAR)
SELECT schwaben FROM table_23224961_1 WHERE oberbayern_a = "Wacker Burghausen"
What is the 9:30 program airing on the station that airs The Red Green Show at 8:30?
CREATE TABLE table_35273 ("7:00" text,"7:30" text,"8:00" text,"8:30" text,"9:00" text,"9:30" text,"10:00" text,"10:30" text)
SELECT "9:30" FROM table_35273 WHERE "8:30" = 'the red green show'
What does DeShawn Stevenson weigh?
CREATE TABLE table_68997 ("Pos." text,"Player" text,"Team" text,"Height" text,"Weight" real)
SELECT SUM("Weight") FROM table_68997 WHERE "Player" = 'deshawn stevenson'
What are the descriptions of the service types with product price above 100, and count them by a bar chart, and I want to order in desc by the names.
CREATE TABLE Bookings (Booking_ID INTEGER,Customer_ID INTEGER,Workshop_Group_ID VARCHAR(100),Status_Code CHAR(15),Store_ID INTEGER,Order_Date DATETIME,Planned_Delivery_Date DATETIME,Actual_Delivery_Date DATETIME,Other_Order_Details VARCHAR(255))CREATE TABLE Ref_Service_Types (Service_Type_Code CHAR(15),Parent_Service_T...
SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description ORDER BY Service_Type_Description DESC
What lost has a position greater than 2, a drawn greater than 0, with an against greater than 15?
CREATE TABLE table_42933 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text)
SELECT "Lost" FROM table_42933 WHERE "Position" > '2' AND "Drawn" > '0' AND "Against" > '15'
What is Tatyana Gubina's Weight?
CREATE TABLE table_name_43 (weight VARCHAR,name VARCHAR)
SELECT weight FROM table_name_43 WHERE name = "tatyana gubina"
how many patients whose admission type is elective and diagnoses long title is personal history of surgery to other organs?
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.admission_type = "ELECTIVE" AND diagnoses.long_title = "Personal history of surgery to other organs"
for patients who received physical restraints in this year, what are the top three most frequent diagnoses that followed afterwards within 2 months?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (uniquepid text,patienthealths...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'physical restraints' AND DATETIME(treatm...
Show the range that has the most number of mountains.
CREATE TABLE climber (climber_id number,name text,country text,time text,points number,mountain_id number)CREATE TABLE mountain (mountain_id number,name text,height number,prominence number,range text,country text)
SELECT range FROM mountain GROUP BY range ORDER BY COUNT(*) DESC LIMIT 1
Tell me the total number of ties for name of totals and lost more than 30
CREATE TABLE table_name_27 (ties VARCHAR,name VARCHAR,lost VARCHAR)
SELECT COUNT(ties) FROM table_name_27 WHERE name = "totals" AND lost > 30
Name the number opponent for loss result
CREATE TABLE table_24000 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Cardinals points" real,"Opponents" real,"Record" text)
SELECT COUNT("Opponent") FROM table_24000 WHERE "Result" = 'Loss'
count the number of patients who had been given a rigid proctosigmoidoscpy procedure this year.
CREATE TABLE diagnoses_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_items (row_id number,itemid number,label text,linksto text)CREATE TABLE...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'rigid proctosigmoidoscpy') AND DATETIME(procedures_i...
What was the Score on March 1?
CREATE TABLE table_37199 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text)
SELECT "Score" FROM table_37199 WHERE "Date" = 'march 1'
What's the Time/Retired of 80 laps with a Grid larger than 2?
CREATE TABLE table_name_51 (time_retired VARCHAR,laps VARCHAR,grid VARCHAR)
SELECT time_retired FROM table_name_51 WHERE laps = 80 AND grid > 2
Name the total fat which has a polyunsaturated fat of 11g and monounsaturated fat of 45g
CREATE TABLE table_53753 ("Total fat" text,"Saturated fat" text,"Monounsaturated fat" text,"Polyunsaturated fat" text,"Smoke point" text)
SELECT "Total fat" FROM table_53753 WHERE "Polyunsaturated fat" = '11g' AND "Monounsaturated fat" = '45g'
How many games did they play on february 5?
CREATE TABLE table_23308178_8 (opponent VARCHAR,date VARCHAR)
SELECT opponent FROM table_23308178_8 WHERE date = "February 5"
Among patients diagnosed with rheumatic heart failure, calculate the total number of those born before the year 2168.
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.dob_year < "2168" AND diagnoses.short_title = "Rheumatic heart failure"
What is the total Launches to date with a Version of 541, and CCBs smaller than 1?
CREATE TABLE table_12581 ("Version" text,"Fairing" text,"CCBs" real,"SRBs" text,"Upper stage" text,"Payload to LEO" text,"Payload to GTO" text,"Launches to date" real)
SELECT COUNT("Launches to date") FROM table_12581 WHERE "Version" = '541' AND "CCBs" < '1'
In what venue was the event held on 14 February 2009?
CREATE TABLE table_name_95 (venue VARCHAR,date VARCHAR)
SELECT venue FROM table_name_95 WHERE date = "14 february 2009"
what are the five most commonly prescribed medication for patients who have been diagnosed with encephalopathy - metabolic previously during the same month, in the last year?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid numb...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'encephalopathy - metabolic' AND DATETIME(diagnosis...
How tall is the contestant from Aruba?
CREATE TABLE table_23814 ("Country" text,"Contestant" text,"Age" real,"Height (cm)" real,"Height (ft)" text,"Hometown" text)
SELECT "Height (ft)" FROM table_23814 WHERE "Country" = 'Aruba'
What are the notes for the rower in ranks over 2 and having a time of 7:00:46?
CREATE TABLE table_63154 ("Rank" real,"Rowers" text,"Country" text,"Time" text,"Notes" text)
SELECT "Notes" FROM table_63154 WHERE "Rank" > '2' AND "Time" = '7:00:46'
What's the home team for the western oval venue?
CREATE TABLE table_54272 ("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_54272 WHERE "Venue" = 'western oval'
How much did the Modern Pentathlon III Series coin weigh?
CREATE TABLE table_15744 ("Year" real,"Denomination" text,"Alloy" text,"Reverse" text,"Diameter" text,"Weight" text,"Obverse" text,"Mintage" real,"Series" text)
SELECT "Weight" FROM table_15744 WHERE "Series" = 'iii series' AND "Reverse" = 'modern pentathlon'
Which Points have an Opponent of @ pittsburgh penguins?
CREATE TABLE table_name_86 (points INTEGER,opponent VARCHAR)
SELECT MAX(points) FROM table_name_86 WHERE opponent = "@ pittsburgh penguins"
What is the number of names for each product in the store?, and order Y in desc order.
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, COUNT(Name) FROM Products GROUP BY Name ORDER BY COUNT(Name) DESC
Which Game 2 has an Exhibition of michael o'connor?
CREATE TABLE table_5208 ("Position" text,"Game 1" text,"Game 2" text,"Game 3" text,"Exhibition*" text)
SELECT "Game 2" FROM table_5208 WHERE "Exhibition*" = 'michael o''connor'
What is the Top-25 with a Top-10 of 8, and an Events of 45?
CREATE TABLE table_41939 ("Tournament" text,"Wins" real,"Top-5" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real)
SELECT AVG("Top-25") FROM table_41939 WHERE "Top-10" = '8' AND "Events" = '45'
What is the pennant with Denny, Dumbarton as the builder?
CREATE TABLE table_name_8 (pennant VARCHAR,builder VARCHAR)
SELECT pennant FROM table_name_8 WHERE builder = "denny, dumbarton"
Makio Inoue dubbed on which character?
CREATE TABLE table_2160215_1 (character VARCHAR,original_japanese VARCHAR)
SELECT character FROM table_2160215_1 WHERE original_japanese = "Makio Inoue"
What's the C_{low} value when C_{high} is 12.0?
CREATE TABLE table_73107 ("C_{low}" text,"C_{high}" text,"I_{low}" real,"I_{high}" real,"Category" text)
SELECT "C_{low}" FROM table_73107 WHERE "C_{high}" = '12.0'
What was the attendance for the game against the Houston Oilers?
CREATE TABLE table_name_9 (attendance VARCHAR,opponent VARCHAR)
SELECT attendance FROM table_name_9 WHERE opponent = "houston oilers"
Which E. coli has a human value of HNEIL1?
CREATE TABLE table_49141 ("E. coli" text,"Yeast (S. cerevisiae)" text,"Human" text,"Type" text,"Substrates" text)
SELECT "E. coli" FROM table_49141 WHERE "Human" = 'hneil1'
What is the average Lost when the difference is - 3, and a Played is less than 10?
CREATE TABLE table_41487 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text)
SELECT AVG("Lost") FROM table_41487 WHERE "Difference" = '- 3' AND "Played" < '10'
What date has a set 4 of 25-19?
CREATE TABLE table_name_33 (date VARCHAR,set_4 VARCHAR)
SELECT date FROM table_name_33 WHERE set_4 = "25-19"
What was the minimum number of episodes in any of the series?
CREATE TABLE table_23043 ("No." real,"Country" text,"Local title" text,"Format" text,"Start Date" text,"End Date" text,"Episodes" real,"Premiere/Air Dates" text)
SELECT MIN("Episodes") FROM table_23043
What candidate is associated with the Georgia 4 district?
CREATE TABLE table_1342233_11 (candidates VARCHAR,district VARCHAR)
SELECT candidates FROM table_1342233_11 WHERE district = "Georgia 4"
what is the number of patients whose marital status is single and procedure short title is transplant cadaver donor?
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.marital_status = "SINGLE" AND procedures.short_title = "Transplant cadaver donor"
Find the titles of all the papers written by 'Aaron Turon'.
CREATE TABLE authors (authid number,lname text,fname text)CREATE TABLE papers (paperid number,title text)CREATE TABLE authorship (authid number,instid number,paperid number,authorder number)CREATE TABLE inst (instid number,name text,country text)
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Aaron" AND t1.lname = "Turon"
Tell me the race name where stirling moss won on 16 april
CREATE TABLE table_56809 ("Race Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Constructor" text,"Report" text)
SELECT "Race Name" FROM table_56809 WHERE "Winning driver" = 'stirling moss' AND "Date" = '16 april'
What Payload to GTO has CCBs larger than 1, and a Payload to LEO of 29,400kg?
CREATE TABLE table_name_95 (payload_to_gto VARCHAR,ccbs VARCHAR,payload_to_leo VARCHAR)
SELECT payload_to_gto FROM table_name_95 WHERE ccbs > 1 AND payload_to_leo = "29,400kg"
Which 2010 has a 2006 of w?
CREATE TABLE table_34431 ("Tournament" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text,"2013" text,"Win %" real)
SELECT "2010" FROM table_34431 WHERE "2006" = 'w'
What is the highest Against where they lost less than 20 games, tied more than 2 of them, and they had Favour less than 11?
CREATE TABLE table_name_85 (against INTEGER,favour VARCHAR,lost VARCHAR,draw VARCHAR)
SELECT MAX(against) FROM table_name_85 WHERE lost < 20 AND draw > 2 AND favour < 11
how many dancers achieved a best score of at least 40 ?
CREATE TABLE table_204_711 (id number,"dance" text,"best dancer(s)" text,"best score" number,"worst dancer(s)" text,"worst score" number)
SELECT COUNT("best dancer(s)") FROM table_204_711 WHERE "best score" >= 40
What is the away team where the home team is Coventry City?
CREATE TABLE table_41718 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text,"Attendance" text)
SELECT "Away team" FROM table_41718 WHERE "Home team" = 'coventry city'
What method was used that had a resulting win against opponent, Natsuko Kikukawa?
CREATE TABLE table_name_56 (method VARCHAR,res VARCHAR,opponent VARCHAR)
SELECT method FROM table_name_56 WHERE res = "win" AND opponent = "natsuko kikukawa"
Find All_Home and School_ID , and group by attribute ACC_Road, and visualize them by a bar chart, and I want to list from low to high by the y-axis please.
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_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En...
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY School_ID
Name the 2009 ffor 2010 of 1r and 2012 of a and 2008 of 2r
CREATE TABLE table_name_44 (Id VARCHAR)
SELECT 2009 FROM table_name_44 WHERE 2010 = "1r" AND 2012 = "a" AND 2008 = "2r"
How many times was performer 3 Kate Robbins?
CREATE TABLE table_14934885_1 (date VARCHAR,performer_3 VARCHAR)
SELECT COUNT(date) FROM table_14934885_1 WHERE performer_3 = "Kate Robbins"
List all the username and passwords of users with the most popular role.
CREATE TABLE document_functional_areas (document_code text,functional_area_code text)CREATE TABLE roles (role_code text,role_description text)CREATE TABLE users (user_id number,role_code text,user_name text,user_login text,password text)CREATE TABLE document_structures (document_structure_code text,parent_document_stru...
SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1
Quality of content: Average amount of upvotes.
CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text te...
SELECT Month = DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0), 'Average amount of upvotes' = SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END) / CAST(COUNT(Id) AS FLOAT) FROM PostFeedback GROUP BY DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) ORDER BY DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0)
provide the number of patients whose admission type is elective and item id is 51256?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.itemid = "51256"
When was the super b capacity reached when the freight carried s tonne was 198818?
CREATE TABLE table_17798 ("Year" real,"Road Opened" text,"Road Closed" text,"Freight Carried s Tonne" real,"Super B Capacity Reached [ citation needed ]" text,"Number of Truck Loads North" real)
SELECT "Super B Capacity Reached [ citation needed ]" FROM table_17798 WHERE "Freight Carried s Tonne" = '198818'
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by time.
CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),M...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
Between 522 and 527 , which course is more difficult ?
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 instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE p...
SELECT DISTINCT course.number FROM course, program_course WHERE (course.number = 522 OR course.number = 527) AND course.department = 'EECS' AND program_course.course_id = course.course_id ORDER BY program_course.workload DESC LIMIT 1
did patient 025-44495 ever have any microbiology tests done in 12/2105?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid num...
SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND STRFTIME('%y-%m', microlab.culturetakentime) = '2105-12'
NEWARK to CLEVELAND DAILY
CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_...
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 = 'NEWARK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CLEVEL...
Are there any Global Sustainable Enterprise courses that satisfy the Other requirement ?
CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TAB...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Global Sustainable Enterprise%' OR course.description LIKE '%Global Sustainable Enterprise%' OR ...
List all season numbers with production codes of 5m21.
CREATE TABLE table_25897 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text)
SELECT "Season #" FROM table_25897 WHERE "Production code" = '5M21'
On what date did the away team score 12.9 (81)?
CREATE TABLE table_33044 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Date" FROM table_33044 WHERE "Away team score" = '12.9 (81)'
what is the date for the tournament acapulco?
CREATE TABLE table_13949 ("Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text)
SELECT "Date" FROM table_13949 WHERE "Tournament" = 'acapulco'
How many o-19% are where the quartier is in saint-loup?
CREATE TABLE table_29615165_5 (_percentage_0_19_years VARCHAR,quartier VARCHAR)
SELECT _percentage_0_19_years FROM table_29615165_5 WHERE quartier = "Saint-Loup"
Count the number of patients taking drug via pb route with aortic insufficiency/re-do sternostomy aortic valve replacement as their primary disease.
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT " AND prescriptions.route = "PB"
What is the area of the city with a density of 955.6?
CREATE TABLE table_name_72 (area_km² VARCHAR,density__hab_km²_ VARCHAR)
SELECT area_km² FROM table_name_72 WHERE density__hab_km²_ = "955.6"
How many floors are there at 32 n. main street?
CREATE TABLE table_name_15 (floors INTEGER,street_address VARCHAR)
SELECT SUM(floors) FROM table_name_15 WHERE street_address = "32 n. main street"
Frequency for kamy?
CREATE TABLE table_name_4 (frequency_mhz VARCHAR,call_sign VARCHAR)
SELECT frequency_mhz FROM table_name_4 WHERE call_sign = "kamy"
What was the average number of people born in other EU states in millions, when the number of people born in a non EU state in millions was 31.368, and when the total population in millions was higher than 501.098?
CREATE TABLE table_6943 ("Country" text,"Total population (millions)" real,"Total Foreign-born (millions)" real,"Born in other EU state (millions)" real,"Born in a non EU state (millions)" real)
SELECT AVG("Born in other EU state (millions)") FROM table_6943 WHERE "Born in a non EU state (millions)" = '31.368' AND "Total population (millions)" > '501.098'
What was the production code of the episode directed by Rondell Sheridan?
CREATE TABLE table_74358 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Prod. code" real,"U.S. viewers (millions)" text)
SELECT MAX("Prod. code") FROM table_74358 WHERE "Directed by" = 'Rondell Sheridan'
Draw a bar chart about the distribution of login_name and author_tutor_ATB .
CREATE TABLE Courses (course_id INTEGER,author_id INTEGER,subject_id INTEGER,course_name VARCHAR(120),course_description VARCHAR(255))CREATE TABLE Student_Course_Enrolment (registration_id INTEGER,student_id INTEGER,course_id INTEGER,date_of_enrolment DATETIME,date_of_completion DATETIME)CREATE TABLE Student_Tests_Take...
SELECT login_name, author_tutor_ATB FROM Course_Authors_and_Tutors ORDER BY personal_name