instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
How many episodes were viewed by 1.29 million people?
CREATE TABLE table_23918997_1 (no VARCHAR,us_viewers__million_ VARCHAR)
SELECT COUNT(no) FROM table_23918997_1 WHERE us_viewers__million_ = "1.29"
What is the Height of the Sophomore Guard weighing 185?
CREATE TABLE table_name_54 (height VARCHAR,weight VARCHAR,year VARCHAR,position VARCHAR)
SELECT height FROM table_name_54 WHERE year = "sophomore" AND position = "guard" AND weight = 185
What is the 8:30 feature with a 7:00 feature Loft Story?
CREATE TABLE table_38091 ("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 "8:30" FROM table_38091 WHERE "7:00" = 'loft story'
which ranked higher in place , israel or the united kingdom ?
CREATE TABLE table_203_803 (id number,"draw" number,"country" text,"language" text,"artist" text,"song" text,"english translation" text,"place" number,"points" number)
SELECT "country" FROM table_203_803 WHERE "country" IN ('israel', 'united kingdom') ORDER BY "place" LIMIT 1
How many races were in the Mallala Motor Sport Park circuit?
CREATE TABLE table_name_48 (race VARCHAR,circuit VARCHAR)
SELECT COUNT(race) FROM table_name_48 WHERE circuit = "mallala motor sport park"
Which player was from England with a to par of +1?
CREATE TABLE table_8922 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Player" FROM table_8922 WHERE "To par" = '+1' AND "Country" = 'england'
who is the winners where season result is 7th
CREATE TABLE table_16696 ("Year" real,"Winners" text,"Grand Finalist" text,"Scores" text,"Venue" text,"Crowd" real,"Margin" real,"Season Result" text)
SELECT "Winners" FROM table_16696 WHERE "Season Result" = '7th'
What is the final score when the opponent was Real Espa a, in the 2008 09 season?
CREATE TABLE table_7994 ("Date" text,"Season" text,"Playing for" text,"Opponent" text,"Final score" text)
SELECT "Final score" FROM table_7994 WHERE "Opponent" = 'real españa' AND "Season" = '2008–09'
give me the number of patients whose drug type is main and lab test name is total protein, urine?
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "MAIN" AND lab.label = "Total Protein, Urine"
A bar chart shows the distribution of date_address_to and the sum of monthly_rental bin date_address_to by time.
CREATE TABLE Behavior_Incident (incident_id INTEGER,incident_type_code VARCHAR(10),student_id INTEGER,date_incident_start DATETIME,date_incident_end DATETIME,incident_summary VARCHAR(255),recommendations VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Teachers (teacher_id INTEGER,address_id INTEGER,first_name VARC...
SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC
What is the enrollment for the AAAA class in IHSAA?
CREATE TABLE table_name_85 (enrollment INTEGER,ihsaa_football_class VARCHAR)
SELECT SUM(enrollment) FROM table_name_85 WHERE ihsaa_football_class = "aaaa"
Name the candidates for illinois 15
CREATE TABLE table_1341672_14 (candidates VARCHAR,district VARCHAR)
SELECT candidates FROM table_1341672_14 WHERE district = "Illinois 15"
What country has an Elevation less than 1833 and an Isolation (km) larger than 18, and a Peak of store lenangstind?
CREATE TABLE table_name_64 (county VARCHAR,peak VARCHAR,elevation__m_ VARCHAR,isolation__km_ VARCHAR)
SELECT county FROM table_name_64 WHERE elevation__m_ < 1833 AND isolation__km_ > 18 AND peak = "store lenangstind"
What is Accolade, when Year is less than 2009, and when Country is Germany?
CREATE TABLE table_7602 ("Publication" text,"Country" text,"Accolade" text,"Year" real,"Rank" real)
SELECT "Accolade" FROM table_7602 WHERE "Year" < '2009' AND "Country" = 'germany'
What score has 3-7 as the record?
CREATE TABLE table_33808 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Time" text,"Att." text,"Record" text)
SELECT "Score" FROM table_33808 WHERE "Record" = '3-7'
How many different percentages of immigrants in 2006 can there be for Morocco?
CREATE TABLE table_26203 ("Country" text,"% of all immigrants 2008" text,"% of all immigrants 2007" text,"% of all immigrants 2006" text,"% of all immigrants 2005" text,"% of all immigrants 2004" text)
SELECT COUNT("% of all immigrants 2006") FROM table_26203 WHERE "Country" = 'Morocco'
Who was the opponent that also has a save of Smith (26)?
CREATE TABLE table_name_53 (opponent VARCHAR,save VARCHAR)
SELECT opponent FROM table_name_53 WHERE save = "smith (26)"
What 2nd leg has pelister as team 1?
CREATE TABLE table_name_7 (team_1 VARCHAR)
SELECT 2 AS nd_leg FROM table_name_7 WHERE team_1 = "pelister"
What is the High rebounds with a High assists with bryant (7), and a Team of @ utah?
CREATE TABLE table_77504 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Series" text)
SELECT "High rebounds" FROM table_77504 WHERE "High assists" = 'bryant (7)' AND "Team" = '@ utah'
When is the next offering of Computational Economics ?
CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varchar,minor varchar,internship varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id ...
SELECT DISTINCT semester.semester, semester.year FROM semester INNER JOIN course_offering ON semester.semester_id = course_offering.semester INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.name LIKE '%Computational Economics%' AND semester.semester_id > (SELECT SEMESTERalias1.semester_id ...
is there a red eye flight from SAN JOSE to NASHVILLE on wednesday the nineteenth of may
CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE ...
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 (((((flight.departure_time <= 2359 AND flight.departure_time >= 2100) OR (flight.departure_time <= 300 AND flight.departure_time >= 0)) AND (flig...
What time was the event k-1 the challenge 1999?
CREATE TABLE table_48502 ("Result" text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text)
SELECT "Time" FROM table_48502 WHERE "Event" = 'k-1 the challenge 1999'
among patients who have been diagnosed with prim cardiomyopathy nec tell me the one year survival rate.
CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance tex...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.charttime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id...
Which Open 2nd VIII had a U15 6th Quad of BGS and a U16 1st VII of TSS?
CREATE TABLE table_52134 ("Crew" real,"Open 1st VIII" text,"Open 2nd VIII" text,"Open 3rd VIII" text,"U16 1st VIII" text,"U16 2nd VIII" text,"U16 3rd VIII" text,"U15 1st Quad" text,"U15 2nd Quad" text,"U15 3rd Quad" text,"U15 4th Quad" text,"U15 5th Quad" text,"U15 6th Quad" text)
SELECT "Open 2nd VIII" FROM table_52134 WHERE "U15 6th Quad" = 'bgs' AND "U16 1st VIII" = 'tss'
How many targets are there with an approval date of 1997?
CREATE TABLE table_20928 ("Antibody" text,"Brand name" text,"Approval date" real,"Type" text,"Target" text,"Approved treatment(s)" text)
SELECT COUNT("Target") FROM table_20928 WHERE "Approval date" = '1997'
For each Orange county campus, report the number of degrees granted after 2000.
CREATE TABLE campuses (campus VARCHAR,id VARCHAR,county VARCHAR)CREATE TABLE degrees (degrees INTEGER,campus VARCHAR,year VARCHAR)
SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = "Orange" AND T2.year >= 2000 GROUP BY T1.campus
provide the number of patients whose language is span and age is less than 76?
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 WHERE demographic.language = "SPAN" AND demographic.age < "76"
For the game that was 76-85, what was the record?
CREATE TABLE table_43762 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Leading scorer" text,"Attendance" text,"Record" text)
SELECT "Record" FROM table_43762 WHERE "Score" = '76-85'
Show the member names which are in both the party with id 3 and the party with id 1.
CREATE TABLE member (member_id number,member_name text,party_id text,in_office text)CREATE TABLE party_events (event_id number,event_name text,party_id number,member_in_charge_id number)CREATE TABLE region (region_id number,region_name text,date text,label text,format text,catalogue text)CREATE TABLE party (party_id nu...
SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1
Show the denomination shared by more than one school.
CREATE TABLE school_performance (school_id number,school_year text,class_a text,class_aa text)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,bo...
SELECT denomination FROM school GROUP BY denomination HAVING COUNT(*) > 1
when did the first intake of patient 002-13510 have been since 08/14/2102?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,cultur...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-13510')) AND intakeoutput.cellpath LIKE '%intake%...
Which Points have a Record of 12 2 4 1, and a November larger than 22?
CREATE TABLE table_36294 ("Game" real,"November" real,"Opponent" text,"Score" text,"Record" text,"Points" real)
SELECT AVG("Points") FROM table_36294 WHERE "Record" = '12–2–4–1' AND "November" > '22'
How many touchdowns did the fullback score?
CREATE TABLE table_25711913_8 (touchdowns INTEGER,position VARCHAR)
SELECT MIN(touchdowns) FROM table_25711913_8 WHERE position = "Fullback"
How many votes did the security guard get?
CREATE TABLE table_name_78 (votes VARCHAR,occupation VARCHAR)
SELECT votes FROM table_name_78 WHERE occupation = "security guard"
Who was the home team when the away team was Hawthorn?
CREATE TABLE table_name_15 (home_team VARCHAR,away_team VARCHAR)
SELECT home_team FROM table_name_15 WHERE away_team = "hawthorn"
What was the result before week 13 when they played the Oakland Raiders?
CREATE TABLE table_name_33 (result VARCHAR,week VARCHAR,opponent VARCHAR)
SELECT result FROM table_name_33 WHERE week < 13 AND opponent = "oakland raiders"
How many episodes did Cliff Bole directed in season 3?
CREATE TABLE table_1782 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (million)" text)
SELECT COUNT("Title") FROM table_1782 WHERE "Directed by" = 'Cliff Bole'
During melbourne's home game, who was the away team?
CREATE TABLE table_name_51 (away_team VARCHAR,home_team VARCHAR)
SELECT away_team FROM table_name_51 WHERE home_team = "melbourne"
participant's triglyceride level is < 250 mg / dl and ldl cholesterol is <= 150 mg / dl at screening.
CREATE TABLE table_train_255 ("id" int,"ldl_cholesterol" int,"hemoglobin_a1c_hba1c" float,"body_weight" float,"urine_albumin_to_creatinine_ratio_uacr" int,"hba1c" float,"body_mass_index_bmi" float,"triglyceride_tg" float,"age" float,"NOUSE" float)
SELECT * FROM table_train_255 WHERE triglyceride_tg < 250 AND ldl_cholesterol <= 150
What is Visitor, when Date is 'April 24'?
CREATE TABLE table_12220 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text)
SELECT "Visitor" FROM table_12220 WHERE "Date" = 'april 24'
i would like to see the flights from DENVER to PHILADELPHIA
CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days text)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADE...
how many patients whose age is less than 27 and drug route is left eye?
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.age < "27" AND prescriptions.route = "LEFT EYE"
how many patients stayed in hospital for more than 17 days and tested for fibrinogen, functional in lab?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "17" AND lab.label = "Fibrinogen, Functional"
What are the names of technicians and the machine series that they repair?
CREATE TABLE technician (technician_id number,name text,team text,starting_year number,age number)CREATE TABLE repair_assignment (technician_id number,repair_id number,machine_id number)CREATE TABLE machine (machine_id number,making_year number,class text,team text,machine_series text,value_points number,quality_rank n...
SELECT T3.name, T2.machine_series 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
what week had the most attendance ?
CREATE TABLE table_203_691 (id number,"week" number,"date" text,"opponent" text,"result" text,"attendance" number)
SELECT "week" FROM table_203_691 ORDER BY "attendance" DESC LIMIT 1
Tell me the sum of wins for top 5 less than 1
CREATE TABLE table_52223 ("Tournament" text,"Wins" real,"Top-5" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real)
SELECT SUM("Wins") FROM table_52223 WHERE "Top-5" < '1'
How many rounds had an overall of 211?
CREATE TABLE table_39343 ("Round" real,"Pick #" real,"Overall" real,"Name" text,"Position" text,"College" text)
SELECT COUNT("Round") FROM table_39343 WHERE "Overall" = '211'
How many are in the Green Party with a Fine Gael of less than 4 and a Fianna Fail of less than 2 in Athy?
CREATE TABLE table_79702 ("Town" text,"Fianna F\u00e1il" real,"Fine Gael" real,"Labour Party" real,"Green Party" real,"Total" real)
SELECT SUM("Green Party") FROM table_79702 WHERE "Fine Gael" < '4' AND "Fianna F\u00e1il" < '2' AND "Town" = 'athy'
What is the lowest number of games loss with a Points difference of 40 - 17, and over 6 games?
CREATE TABLE table_36755 ("Games" real,"Drawn" real,"Lost" real,"Points difference" text,"Points" real)
SELECT MIN("Lost") FROM table_36755 WHERE "Points difference" = '40 - 17' AND "Games" > '6'
What was the reason for change to the successor that was seated on December 13, 1880?
CREATE TABLE table_2417395_4 (reason_for_change VARCHAR,date_successor_seated VARCHAR)
SELECT reason_for_change FROM table_2417395_4 WHERE date_successor_seated = "December 13, 1880"
Find questions containing the given tag.
CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE Revi...
SELECT q.Id AS "post_link", q.Tags, q.CreationDate, q.LastActivityDate FROM Posts AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = '##tagName:string?geometry##' ORDER BY q.CreationDate DESC
how long was the relay at the 1997 world championships that ken harden ran
CREATE TABLE table_204_395 (id number,"year" number,"competition" text,"venue" text,"position" text,"notes" text)
SELECT "notes" FROM table_204_395 WHERE "year" = 1997 AND "competition" = 'world championships'
What i/o buses are associated with the brand name Core i3-21xxt?
CREATE TABLE table_24538587_11 (i_o_bus VARCHAR,brand_name__list_ VARCHAR)
SELECT i_o_bus FROM table_24538587_11 WHERE brand_name__list_ = "Core i3-21xxT"
What is the relationship between CID and Instructor ?
CREATE TABLE Enrolled_in (StuID INTEGER,CID VARCHAR(7),Grade VARCHAR(2))CREATE TABLE Course (CID VARCHAR(7),CName VARCHAR(40),Credits INTEGER,Instructor INTEGER,Days VARCHAR(5),Hours VARCHAR(11),DNO INTEGER)CREATE TABLE Gradeconversion (lettergrade VARCHAR(2),gradepoint FLOAT)CREATE TABLE Student (StuID INTEGER,LName V...
SELECT CID, Instructor FROM Course ORDER BY Credits
Which 2007 has a Country or territory of china, and a 2002 smaller than 670,099?
CREATE TABLE table_65194 ("Country or territory" text,"2000" real,"2001" real,"2002" real,"2003" real,"2004" real,"2005" real,"2006" real,"2007" real,"2008" real,"2009" real,"2010" real,"2011" real)
SELECT MIN("2007") FROM table_65194 WHERE "Country or territory" = 'china' AND "2002" < '670,099'
When did the season premiere that saw 8.4 million viewers first air?
CREATE TABLE table_299121_2 (season VARCHAR,viewers__in_millions_ VARCHAR)
SELECT season AS premiere FROM table_299121_2 WHERE viewers__in_millions_ = "8.4"
Display a bar chart for what are the names and budgets of departments with budgets greater than the average?, and I want to order from low to high by the x-axis please.
CREATE TABLE classroom (building varchar(15),room_number varchar(7),capacity numeric(4,0))CREATE TABLE course (course_id varchar(8),title varchar(50),dept_name varchar(20),credits numeric(2,0))CREATE TABLE department (dept_name varchar(20),building varchar(15),budget numeric(12,2))CREATE TABLE instructor (ID varchar(5)...
SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department) ORDER BY dept_name
Which is the earliest paper by aravind rajeswaran ?
CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE writes (paperid int,authorid int)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TA...
SELECT DISTINCT paper.paperid, paper.year FROM author, paper, writes WHERE author.authorname = 'aravind rajeswaran' AND paper.year = (SELECT MIN(PAPERalias1.year) FROM author AS AUTHORalias1, paper AS PAPERalias1, writes AS WRITESalias1 WHERE AUTHORalias1.authorname = 'aravind rajeswaran' AND WRITESalias1.authorid = AU...
Name the most points for independiente
CREATE TABLE table_16940409_1 (points INTEGER,team VARCHAR)
SELECT MAX(points) FROM table_16940409_1 WHERE team = "Independiente"
what is the first flight from BOSTON to STAPLETON airport for tomorrow
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 dual_carrier (ma...
SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, date_day, days, flight WHERE ((airport.airport_name LIKE 'STAPLETON' AND date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airpo...
Show how many rank from each rank, and show x axis in descending order.
CREATE TABLE Faculty_Participates_in (FacID INTEGER,actid INTEGER)CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR(15),Fname VARCHAR(15),Rank VARCHAR(15),Sex VARCHAR(1),Phone INTEGER,Room VARCHAR(5),Building VARCHAR(13))CREATE TABLE Student (StuID INTEGER,LName...
SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank ORDER BY Rank DESC
What is the smallest number of spikes for players with a weight of 83 and height over 190?
CREATE TABLE table_42408 ("Name" text,"Date of Birth" text,"Height" real,"Weight" real,"Spike" real)
SELECT MIN("Spike") FROM table_42408 WHERE "Weight" = '83' AND "Height" > '190'
List the builders of railways in ascending alphabetical order.
CREATE TABLE railway (Builder VARCHAR)
SELECT Builder FROM railway ORDER BY Builder
Name the episode summary for travis brown
CREATE TABLE table_2140071_12 (episode VARCHAR,coach VARCHAR)
SELECT episode AS Summary FROM table_2140071_12 WHERE coach = "Travis Brown"
where is a restaurant in alameda ?
CREATE TABLE location (restaurant_id int,house_number int,street_name varchar,city_name varchar)CREATE TABLE geographic (city_name varchar,county varchar,region varchar)CREATE TABLE restaurant (id int,name varchar,food_type varchar,city_name varchar,rating "decimal)
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'alameda' AND restaurant.id = location.restaurant_id
what's the alloy with series being ii series
CREATE TABLE table_17595 ("Year" real,"Denomination" text,"Alloy" text,"Reverse" text,"Diameter" text,"Weight" text,"Obverse" text,"Mintage" real,"Series" text)
SELECT "Alloy" FROM table_17595 WHERE "Series" = 'II series'
The classes with labs are not taught by which professors ?
CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_discussion varchar,has_lab varchar,has_projects varchar,has_exams varchar,num_reviews int,clarity_score i...
SELECT DISTINCT instructor.name FROM instructor, course, course_offering, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course_offering.offering_id = offering_instructor.offering_id AND instructor.instructor_id = offering_instructor.instructor_id AND NOT instr...
What is the total number of positions with less than 10 points, more than 7 qualifying, ret value in Race 1, and Jonathan Grant driving?
CREATE TABLE table_40495 ("Pos." real,"Driver" text,"Qualifying" real,"Race 1" text,"Race 2" text,"Race 3" text,"Points" real)
SELECT COUNT("Pos.") FROM table_40495 WHERE "Points" < '10' AND "Qualifying" > '7' AND "Race 1" = 'ret' AND "Driver" = 'jonathan grant'
On what date is the venue Sam Nujoma Stadium, Windhoek, Namibia?
CREATE TABLE table_62700 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text)
SELECT "Date" FROM table_62700 WHERE "Venue" = 'sam nujoma stadium, windhoek, namibia'
Which Thursday does big brother 13 air?
CREATE TABLE table_77958 ("Series" text,"Monday" text,"Tuesday" text,"Thursday" text,"Saturday" text)
SELECT "Thursday" FROM table_77958 WHERE "Series" = 'big brother 13'
Who is the opponent on april 16?
CREATE TABLE table_78154 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text)
SELECT "Opponent" FROM table_78154 WHERE "Date" = 'april 16'
Who was the home team when the score was 4 3?
CREATE TABLE table_name_93 (home VARCHAR,score VARCHAR)
SELECT home FROM table_name_93 WHERE score = "4–3"
What is the Arena when there were 65 points?
CREATE TABLE table_79216 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text,"Arena" text,"Points" text)
SELECT "Arena" FROM table_79216 WHERE "Points" = '65'
What Tournament has a Winning score of 16 (66-64-67=197)?
CREATE TABLE table_66189 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner(s)-up" text)
SELECT "Tournament" FROM table_66189 WHERE "Winning score" = '−16 (66-64-67=197)'
What is the lowest match that has a lost greater than 3, and kolejarz rawicz as the team?
CREATE TABLE table_42856 ("Team" text,"Match" real,"Points" real,"Draw" real,"Lost" real)
SELECT MIN("Match") FROM table_42856 WHERE "Lost" > '3' AND "Team" = 'kolejarz rawicz'
what was the top three most frequently performed procedures that patients were given during the same hospital visit after being diagnosed with oth lymp unsp xtrndl org since 1 year ago?
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 d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i...
known pre _ existing left ventricular dysfunction ( ef < 45 % prior to admission )
CREATE TABLE table_test_22 ("id" int,"ejection_fraction_ef" int,"pregnancy_or_lactation" bool,"child_pugh_class" string,"hbv" bool,"systolic_blood_pressure_sbp" int,"active_infection" bool,"leukocyte_count" int,"hiv_infection" bool,"left_ventricular_dysfunction" bool,"active_inflammatory_diseases" bool,"hcv" bool,"neut...
SELECT * FROM table_test_22 WHERE left_ventricular_dysfunction = 1 OR ejection_fraction_ef < 45
What was the final score of the game on June 17?
CREATE TABLE table_name_74 (score VARCHAR,date VARCHAR)
SELECT score FROM table_name_74 WHERE date = "june 17"
what was the away team for the north melbourne home team?
CREATE TABLE table_52376 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team" FROM table_52376 WHERE "Home team" = 'north melbourne'
For Model e64 what is the zAAPs/zIIPs?
CREATE TABLE table_40961 ("Model" text,"Books / PUs" text,"IFLs / uIFLs" text,"zAAPs / zIIPs" text,"ICFs" text,"Opt SAPs" text,"Std SAPs" real,"Std Spares" real,"Standard Memory (GB)" text,"Flexible Memory (GB)" text)
SELECT "zAAPs / zIIPs" FROM table_40961 WHERE "Model" = 'e64'
how much difference of heart rate has patient 14982 experienced last measured on the last intensive care unit visit compared to the value first measured on the last intensive care unit visit?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE transfers (row_id num...
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14982) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents...
When 0.6 1.4 is the b r (t) what is the h ci (ka/m)?
CREATE TABLE table_25388 ("Magnet" text,"B r (T)" text,"H ci (kA/m)" text,"(BH) max (kJ/m 3)" text,"T c (\u00b0C)" text)
SELECT "H ci (kA/m)" FROM table_25388 WHERE "B r (T)" = '0.6–1.4'
What team did team carlton play while away?
CREATE TABLE table_name_42 (home_team VARCHAR,away_team VARCHAR)
SELECT home_team FROM table_name_42 WHERE away_team = "carlton"
what role did damon play most throughout his career ?
CREATE TABLE table_203_438 (id number,"year" number,"title" text,"role" text,"notes" text)
SELECT "role" FROM table_203_438 GROUP BY "role" ORDER BY COUNT(*) DESC LIMIT 1
In Round 13, what was the Pick # of the Guard Position with an Overall greater than 23?
CREATE TABLE table_name_53 (pick__number VARCHAR,round VARCHAR,overall VARCHAR,position VARCHAR)
SELECT pick__number FROM table_name_53 WHERE overall > 23 AND position = "guard" AND round = 13
What Hyper Transport version has 22.4 gb/s of Max. Aggregate bandwidth?
CREATE TABLE table_name_51 (hypertransport_version VARCHAR,max_aggregate_bandwidth__bi_directional_ VARCHAR)
SELECT hypertransport_version FROM table_name_51 WHERE max_aggregate_bandwidth__bi_directional_ = "22.4 gb/s"
What is Time, when Year is greater than 2011, and when Event is '800 Freestyle Relay'?
CREATE TABLE table_59145 ("Event" text,"Time" text,"Swimmer" text,"School" text,"Year" real)
SELECT "Time" FROM table_59145 WHERE "Year" > '2011' AND "Event" = '800 freestyle relay'
What is the location of the tiruchirappalli district?
CREATE TABLE table_name_73 (location VARCHAR,district VARCHAR)
SELECT location FROM table_name_73 WHERE district = "tiruchirappalli district"
give me the number of patients whose discharge location is short term hospital and year of birth is less than 1837?
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.dob_year < "1837"
Which studios have an average gross of over 4500000?
CREATE TABLE film_market_estimation (estimation_id number,low_estimate number,high_estimate number,film_id number,type text,market_id number,year number)CREATE TABLE market (market_id number,country text,number_cities number)CREATE TABLE film (film_id number,title text,studio text,director text,gross_in_dollar number)
SELECT studio FROM film GROUP BY studio HAVING AVG(gross_in_dollar) >= 4500000
If the just cents is 84.46, what is the just ratio?
CREATE TABLE table_22719 ("interval name" text,"size (steps)" real,"size (cents)" real,"just ratio" text,"just (cents)" text,"error" text,"audio" text)
SELECT "just ratio" FROM table_22719 WHERE "just (cents)" = '84.46'
when was the first microbiology test of patient 28447, in this month?
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 time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE admissions ...
SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28447) AND DATETIME(microbiologyevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') ORDER BY microbiologyevent...
what project was initially started before september 20, 1968
CREATE TABLE table_4185 ("#" text,"Project" text,"Shipyard" text,"Laid down" text,"Launched" text,"Commissioned" text,"Status" text)
SELECT "Commissioned" FROM table_4185 WHERE "Launched" = 'September 20, 1968'
Number of votes per month. Accounting only for votes cast on questions less than 31 days after the question was created.
CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidan...
WITH UpVotesByDay AS (SELECT DATEADD(day, DATEDIFF(day, 0, CreationDate), 0) AS "day", COUNT(v.Id) AS Votes FROM Votes AS v JOIN Posts AS p ON (p.Id = v.PostId) AND p.PostTypeId = 1 WHERE v.VoteTypeId = 2 GROUP BY DATEADD(day, DATEDIFF(day, 0, CreationDate), 0)), DownVotesByDay AS (SELECT DATEADD(day, DATEDIFF(day, 0, ...
How many points did the Castres have?
CREATE TABLE table_67278 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Bonus points" text,"Points" text)
SELECT "Points for" FROM table_67278 WHERE "Club" = 'castres'
What is the record of the game when Los Angeles was the home team?
CREATE TABLE table_53886 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Decision" text,"Attendance" real,"Record" text)
SELECT "Record" FROM table_53886 WHERE "Home" = 'los angeles'
What is the lowest total of player tommy ring, who has a rank greater than 1?
CREATE TABLE table_65864 ("Rank" real,"Player" text,"County" text,"Tally" text,"Total" real,"Opposition" text)
SELECT MIN("Total") FROM table_65864 WHERE "Player" = 'tommy ring' AND "Rank" > '1'
Papers from ACL 2016 ?
CREATE TABLE field (fieldid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE da...
SELECT DISTINCT paper.paperid FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'ACL'
Who was teh rider with 18 laps and a grid of 25?
CREATE TABLE table_name_43 (rider VARCHAR,laps VARCHAR,grid VARCHAR)
SELECT rider FROM table_name_43 WHERE laps = 18 AND grid = 25
What road is associated with Carson Valley county?
CREATE TABLE table_25438110_5 (road VARCHAR,county VARCHAR)
SELECT road FROM table_25438110_5 WHERE county = "Carson Valley"