table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE table_17330069_1 ( fin_pos VARCHAR, points VARCHAR )
If the points is 15, what is the fin. pos?
SELECT COUNT(fin_pos) FROM table_17330069_1 WHERE points = "15"
CREATE TABLE table_name_68 ( percent_yes VARCHAR, jurisdiction VARCHAR, percent_no VARCHAR )
What is the percent yes of Alberta, which had a percent no larger than 60.2?
SELECT COUNT(percent_yes) FROM table_name_68 WHERE jurisdiction = "alberta" AND percent_no > 60.2
CREATE TABLE table_37099 ( "Title" text, "Date" text, "Theatre" text, "Role" text, "Dance Partner" text, "Director" text, "Lyrics" text, "Music" text )
Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes?
SELECT "Title" FROM table_37099 WHERE "Dance Partner" = 'adele astaire' AND "Lyrics" = 'ira gershwin' AND "Director" = 'felix edwardes'
CREATE TABLE table_28499 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real, "Nickname" text )
How many joined when the enrollment was 1150 in Sioux City, Iowa?
SELECT "Joined" FROM table_28499 WHERE "Enrollment" = '1150' AND "Location" = 'Sioux City, Iowa'
CREATE TABLE table_name_44 ( year_opened VARCHAR, arena_venue VARCHAR )
What year did the San Agustin gym open?
SELECT year_opened FROM table_name_44 WHERE arena_venue = "san agustin gym"
CREATE TABLE table_23398 ( "No. in series" text, "No. in season" real, "Family/families" text, "Location(s)" text, "Original air date" text )
What episode in the season was episode us18 in the series?
SELECT COUNT("No. in season") FROM table_23398 WHERE "No. in series" = 'US18'
CREATE TABLE tryout ( enr INTEGER, cName VARCHAR, pPos VARCHAR ) CREATE TABLE college ( enr INTEGER, cName VARCHAR, pPos VARCHAR )
What is the total number of enrollment of schools that do not have any goalie player?
SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = "goalie")
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( row_id number, subject_id...
what is the maximum monthly number of patients who have had chro kidney dis stage ii since 2102?
SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chro kidney dis stage ii') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2102' GROUP BY STRFTIME('%y...
CREATE TABLE table_4195 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text )
How many seasons are there for the 3rd position?
SELECT COUNT("Season") FROM table_4195 WHERE "Position" = '3rd'
CREATE TABLE table_23285849_10 ( game VARCHAR, team VARCHAR )
When the clippers are the team how many games are there?
SELECT COUNT(game) FROM table_23285849_10 WHERE team = "Clippers"
CREATE TABLE table_204_109 ( id number, "district" text, "incumbent" text, "party" text, "first\nelected" text, "result" text, "candidates" text )
what are the number of times re elected is listed as the result ?
SELECT COUNT(*) FROM table_204_109 WHERE "result" = 're-elected'
CREATE TABLE track ( track_id number, name text, location text, seating number, year_opened number ) CREATE TABLE race ( race_id number, name text, class text, date text, track_id text )
What are the names and seatings for all tracks opened after 2000, ordered by seating?
SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating
CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE paperkeyphrase ( paperid int, ...
papers from 2014
SELECT DISTINCT paperid FROM paper WHERE year = 2014
CREATE TABLE table_name_69 ( visitor VARCHAR, date VARCHAR )
Which team was the visitor on January 10?
SELECT visitor FROM table_name_69 WHERE date = "january 10"
CREATE TABLE table_2192 ( "Year(s)" real, "Commentator" text, "Dual Commentator" text, "Spokesperson" text, "Channel" text )
state all spokesperson for the channel where dual commentator was elena batinova
SELECT "Spokesperson" FROM table_2192 WHERE "Dual Commentator" = 'Elena Batinova'
CREATE TABLE procedures ( 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 diagnoses ( ...
list the number of patients who were admitted before the year 2107.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admityear < "2107"
CREATE TABLE table_43083 ( "Usage" text, "Sn/Sb (%)" text, "Liquid at (\u00b0C)" text, "Casting at (\u00b0C)" text, "Remelting at (\u00b0C)" text, "Hardness" text )
What is the remelting temperature for the alloy that has a Sn/Sb ratio of 9.5/15?
SELECT "Remelting at (\u00b0C)" FROM table_43083 WHERE "Sn/Sb (%)" = '9.5/15'
CREATE TABLE table_2697 ( "Year" real, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text )
Name the total number for report july 23
SELECT COUNT("Report") FROM table_2697 WHERE "Date" = 'July 23'
CREATE TABLE table_14962316_9 ( recopa_sudamericana_1998 VARCHAR, team VARCHAR )
Did Flamengo play in the Recopa Sudamericana in 1998
SELECT recopa_sudamericana_1998 FROM table_14962316_9 WHERE team = "Flamengo"
CREATE TABLE table_1612760_1 ( line VARCHAR, service_pattern VARCHAR )
Which line offers Fast to Norwood Junction?
SELECT line FROM table_1612760_1 WHERE service_pattern = "Fast to Norwood Junction"
CREATE TABLE Addresses ( city VARCHAR, address_id VARCHAR ) CREATE TABLE Staff ( staff_address_id VARCHAR )
Which city lives most of staffs? List the city name and number of staffs.
SELECT T1.city, COUNT(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE table_21429 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "FLaps" real, "Podiums" real, "Points" real, "Position" text )
Which season did he have 0 points and 31st position?
SELECT MAX("Season") FROM table_21429 WHERE "Points" = '0' AND "Position" = '31st'
CREATE TABLE table_204_55 ( id number, "date" text, "time" text, "opponent#" text, "rank#" text, "site" text, "tv" text, "result" text, "attendance" number )
what date is after october 1st ?
SELECT "date" FROM table_204_55 WHERE "date" > (SELECT "date" FROM table_204_55 WHERE "date" = 'october 1, 2005') ORDER BY "date" LIMIT 1
CREATE TABLE table_name_47 ( year INTEGER, position VARCHAR )
What's the average Year for the Position of 7th (sf)?
SELECT AVG(year) FROM table_name_47 WHERE position = "7th (sf)"
CREATE TABLE table_name_4 ( against INTEGER, played INTEGER )
What is the lowest Against when the played is more than 10?
SELECT MIN(against) FROM table_name_4 WHERE played > 10
CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_seaso...
What is the number of films of each director? Return a bar chart, and could you display by the how many directed by in asc?
SELECT Directed_by, COUNT(Directed_by) FROM film GROUP BY Directed_by ORDER BY COUNT(Directed_by)
CREATE TABLE table_1057262_2 ( tasmania VARCHAR, new_south_wales VARCHAR )
what's the total number of tasmania with new south wales crop of 190 kilotonnes
SELECT COUNT(tasmania) FROM table_1057262_2 WHERE new_south_wales = 190
CREATE TABLE table_27922491_8 ( wickets INTEGER )
What is the least amount of wickets?
SELECT MIN(wickets) FROM table_27922491_8
CREATE TABLE table_202_179 ( id number, "pos" text, "no" number, "driver" text, "constructor" text, "laps" number, "time/retired" text, "grid" number, "points" number )
who were the top 3 finishers in the 2005 belgian grand prix ?
SELECT "driver" FROM table_202_179 ORDER BY "points" DESC LIMIT 3
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,...
what is drug type of drug name nafcillin?
SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Nafcillin"
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 t...
how many patients with infected right thigh graft were of american indian/alaska native ethnicty?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.diagnosis = "INFECTED RIGHT THIGH GRAFT"
CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Document_Locations ( Document_ID INTEGER, Location_Code CHAR(15), Date_in_Location_From DATETIME, D...
Show the number of documents in different ending date Bin ending date by weekday and group by location code with a stacked bar chart, could you display in descending by the y axis please?
SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Date_in_Locaton_To) DESC
CREATE TABLE table_name_45 ( position VARCHAR, round VARCHAR, player VARCHAR )
Which Position has a Round larger than 4, and a Player of patrick johnson?
SELECT position FROM table_name_45 WHERE round > 4 AND player = "patrick johnson"
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, ...
when was the last time that patient 31482 had a minimum calcium, total on their current hospital encounter?
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31482 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calcium, total') ORDER BY labevents.valuenum, ...
CREATE TABLE table_66332 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
Who was the fight against when loss was the result at the Gladiator Challenge 87: Collision Course event?
SELECT "Opponent" FROM table_66332 WHERE "Res." = 'loss' AND "Event" = 'gladiator challenge 87: collision course'
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number...
when was the last time patient 010-1155 had a drug intake of volume (ml) magnesium sulfate since 01/16/2105?
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 = '010-1155')) AND intakeoutput.cellpath LIKE '%intake%'...
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 ) C...
What is the primary disease and drug route of Albers Bauer?
SELECT demographic.diagnosis, prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Albert Bauer"
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time...
did patient 006-171217 suffer from any type of allergy in the previous year?
SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-171217')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIME(CURR...
CREATE TABLE table_12963 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text )
Which venue had an against smaller than 7?
SELECT "Venue" FROM table_12963 WHERE "Against" < '7'
CREATE TABLE table_77498 ( "Date" text, "Tournament" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner-up" text )
What was the to par of the tournament that had Ken Duke as a runner-up?
SELECT "To par" FROM table_77498 WHERE "Runner-up" = 'ken duke'
CREATE TABLE table_name_52 ( november VARCHAR, year VARCHAR, october VARCHAR )
Who is in November after 1988 when Prinzzess is in October?
SELECT november FROM table_name_52 WHERE year > 1988 AND october = "prinzzess"
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE gsi ( c...
What time do NATIVEAM 311 lectures start next semester ?
SELECT DISTINCT course_offering.start_time FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'NATIVEAM' AND cours...
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABL...
COMP 416 requires me to take what classes before I can take it ?
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
CREATE TABLE table_204_48 ( id number, "date" text, "race name" text, "location" text, "uci rating" text, "winner" text, "team" text )
what is the name of the first race in the year ?
SELECT "race name" FROM table_204_48 ORDER BY "date" LIMIT 1
CREATE TABLE player_award ( player_id TEXT, award_id TEXT, year INTEGER, league_id TEXT, tie TEXT, notes TEXT ) CREATE TABLE team_half ( year INTEGER, league_id TEXT, team_id TEXT, half INTEGER, div_id TEXT, div_win TEXT, rank INTEGER, g INTEGER, w INTEGER, ...
For each year, bin the year into day of the week interval, and return the average of the number of times the team Boston Red Stockings won in the postseasons using a line chart, order X in desc order please.
SELECT year, AVG(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year DESC
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, ...
Reasonable quality old posts with spelling errors.
SELECT P.Id AS "post_link", P.CreationDate, P.Score, P.PostTypeId, p.LastEditDate, p.LastActivityDate FROM Posts AS P WHERE p.LastEditDate < DATEADD(month, -6, p.LastActivityDate) AND Score >= 5 AND (Title LIKE '%dinamic%' OR Title LIKE '%sintax%' OR Title LIKE '%programatically%') ORDER BY P.Score, P.CreationDate
CREATE TABLE table_30241 ( "Entrant" text, "Constructor" text, "Car" text, "Driver" text, "Co-driver" text, "Rounds" text )
who is the person that is part of the belgian vw club that works with fr d ric miclotte
SELECT "Driver" FROM table_30241 WHERE "Entrant" = 'Belgian VW Club' AND "Co-driver" = 'Frédéric Miclotte'
CREATE TABLE table_15187735_19 ( segment_a VARCHAR, episode VARCHAR )
What is the segment A on episode 237?
SELECT segment_a FROM table_15187735_19 WHERE episode = 237
CREATE TABLE pilot ( Pilot_ID int, Pilot_name text, Rank int, Age int, Nationality text, Position text, Join_Year int, Team text ) CREATE TABLE pilot_record ( Record_ID int, Pilot_ID int, Aircraft_ID int, Date text ) CREATE TABLE aircraft ( Aircraft_ID int, Orde...
What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.
SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUser...
Percent of closed answered negative-scored questions over time.
SELECT MAX(h.t), h.pc AS "Percent of closed answered negative-scored questions over time" FROM (SELECT q.t AS t, NTILE(100) OVER (ORDER BY q.t) AS pc FROM (SELECT ClosedDate - CreationDate AS t FROM Posts WHERE PostTypeId = 1 AND AnswerCount > 0 AND Score < 0 AND NOT ClosedDate IS NULL) AS q) AS h WHERE h.t <= '23:59:5...
CREATE TABLE table_name_68 ( first_airdate VARCHAR, episodes VARCHAR, nielsen_ranking VARCHAR )
What was the first airdate or the season that had less than 24 episodes and a Nielsen ranking of #38?
SELECT first_airdate FROM table_name_68 WHERE episodes < 24 AND nielsen_ranking = "#38"
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREA...
when was the first time patient 022-187132 had a gastric (ng) output during the previous day?
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 = '022-187132')) AND intakeoutput.cellpath LIKE '%output...
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 procedures_icd ( row_id number, subject_id number, ...
did in 2105 patient 71689 visit the hospital?
SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 71689 AND STRFTIME('%y', admissions.admittime) = '2105'
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, chart...
has patient 24921 undergone any medical procedure on their first hospital encounter?
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24921 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)
CREATE TABLE table_66089 ( "Game" text, "Date" text, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text )
What is the location for the game with a score of w 106-81?
SELECT "Location/Attendance" FROM table_66089 WHERE "Score" = 'w 106-81'
CREATE TABLE table_name_55 ( area__km²_ INTEGER, population__2010_ VARCHAR )
Where is the lowest area with a population of 7,616?
SELECT MIN(area__km²_) FROM table_name_55 WHERE population__2010_ = 7 OFFSET 616
CREATE TABLE table_16588 ( "#" real, "Episode" text, "Air Date" text, "Timeslot (EST)" text, "Season" text, "Rating" text, "Share" real, "18\u201349" text, "Viewers (m)" text, "Rank (#)" text )
What is the number of rank with the viewership of 5.96 million?
SELECT COUNT("Rank (#)") FROM table_16588 WHERE "Viewers (m)" = '5.96'
CREATE TABLE table_6104 ( "Celebrity" text, "Known for" text, "Entered" text, "Exited" text, "Finished" text )
What day did the person who finished in 12th place leave on?
SELECT "Exited" FROM table_6104 WHERE "Finished" = '12th'
CREATE TABLE book_club ( publisher VARCHAR, YEAR VARCHAR )
Show all publishers which do not have a book in 1989.
SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989
CREATE TABLE table_name_47 ( overall INTEGER, pick__number VARCHAR, position VARCHAR, round VARCHAR )
Position of defensive tackle, and a Round of 4, and a Pick # smaller than 36 has what overall average?
SELECT AVG(overall) FROM table_name_47 WHERE position = "defensive tackle" AND round = 4 AND pick__number < 36
CREATE TABLE table_name_24 ( record VARCHAR, visitor VARCHAR )
What was the Record of the game in which the Trail Blazers was the visiting team?
SELECT record FROM table_name_24 WHERE visitor = "trail blazers"
CREATE TABLE table_name_99 ( date VARCHAR, decision VARCHAR, home VARCHAR, points VARCHAR )
Which Date has a Home of montreal canadiens, and Points larger than 9, and a Decision of price?
SELECT date FROM table_name_99 WHERE home = "montreal canadiens" AND points > 9 AND decision = "price"
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar...
What classes next semester are being taught by Dr. Scott Baron ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Scott Baron%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offer...
CREATE TABLE Albums ( label VARCHAR )
What are all the labels?
SELECT DISTINCT label FROM Albums
CREATE TABLE table_name_72 ( driver VARCHAR, points VARCHAR )
Which river had 26 points?
SELECT driver FROM table_name_72 WHERE points = 26
CREATE TABLE table_70184 ( "Week" real, "Issue Date" text, "Artist" text, "Single" text, "Download" text, "Title" text )
What's the Issue Date for an Eric Prydz song with a no available Download information?
SELECT "Issue Date" FROM table_70184 WHERE "Download" = 'no available' AND "Artist" = 'eric prydz'
CREATE TABLE customer_orders ( order_id number, customer_id number, order_date time, order_status_code text ) CREATE TABLE addresses ( address_id number, line_1_number_building text, city text, zip_postcode text, state_province_county text, country text ) CREATE TABLE customers...
Show each state and the number of addresses in each state.
SELECT state_province_county, COUNT(*) FROM addresses GROUP BY state_province_county
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
what were the allergies that patient 006-153198 has had since 119 months ago?
SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-153198')) AND DATETIME(allergy.allergytime) >= DATETIME(CURRENT_TIME(...
CREATE TABLE table_name_59 ( december INTEGER, opponent VARCHAR, game VARCHAR )
What is the sum for December against the vancouver canucks earlier than game 33?
SELECT SUM(december) FROM table_name_59 WHERE opponent = "vancouver canucks" AND game < 33
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airli...
list the flights arriving in BALTIMORE from DENVER on 8 3
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, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 2 AND date_day.month_number =...
CREATE TABLE table_name_96 ( cuts_made INTEGER, wins VARCHAR, top_5 VARCHAR )
How many vuts made for a player with 2 wins and under 7 top 5s?
SELECT AVG(cuts_made) FROM table_name_96 WHERE wins = 2 AND top_5 < 7
CREATE TABLE table_name_47 ( result VARCHAR, opponent VARCHAR, attendance VARCHAR )
When the opponent was Brechin City and the attendance was 656, what was the Result?
SELECT result FROM table_name_47 WHERE opponent = "brechin city" AND attendance = 656
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ...
Monthly active users in StackOverflow / StackExchange.
SELECT COUNT(*) AS ActivePosters5 FROM Posts AS p WHERE p.Score >= 0 AND DATEDIFF(day, p.CreationDate, GETDATE()) <= 30 GROUP BY p.OwnerUserId HAVING COUNT(p.Id) >= 5
CREATE TABLE table_11224 ( "Name" text, "Area (km 2 )" real, "Population Estimate 2005" real, "Population Census 2010" real, "Capital" text )
what is the population estimate 2005 for the with the area (km2) 3,034.08?
SELECT AVG("Population Estimate 2005") FROM table_11224 WHERE "Area (km 2 )" = '3,034.08'
CREATE TABLE table_name_75 ( name VARCHAR, rank VARCHAR, year VARCHAR )
I want the name for rank less than 6 and year more than 1974
SELECT name FROM table_name_75 WHERE rank < 6 AND year > 1974
CREATE TABLE table_26156 ( "Year" real, "Division" real, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text )
What is the lowest numbered division Cleveland played in?
SELECT MIN("Division") FROM table_26156
CREATE TABLE table_name_50 ( attendance INTEGER, result VARCHAR )
What is the highest Attendance with a Result that is w 24-21?
SELECT MAX(attendance) FROM table_name_50 WHERE result = "w 24-21"
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE proce...
how many times did patient 3929 come to icu during their current hospital visit?
SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3929 AND admissions.dischtime IS NULL)
CREATE TABLE table_10885 ( "Model number" text, "Frequency" text, "L2 cache" text, "FPU width" text, "Multiplier 1" text, "Socket" text, "Release date" text, "Order part number" text )
what is the frequency of part number tmn550dcr23gm?
SELECT "Frequency" FROM table_10885 WHERE "Order part number" = 'tmn550dcr23gm'
CREATE TABLE table_57294 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text )
Name the speed for andy reynolds
SELECT "Speed" FROM table_57294 WHERE "Rider" = 'andy reynolds'
CREATE TABLE table_2402209_1 ( no_of_barangays VARCHAR, area_coordinator VARCHAR )
How many Barangays lived in the municipality with area coordinator of 110.95?
SELECT no_of_barangays FROM table_2402209_1 WHERE area_coordinator = "110.95"
CREATE TABLE table_41530 ( "Player" text, "Position" text, "Date of Birth (Age)" text, "Caps" text, "Province / Club" text )
What is Caps, when Province / Club is DRFC, and when Position is Center?
SELECT "Caps" FROM table_41530 WHERE "Province / Club" = 'drfc' AND "Position" = 'center'
CREATE TABLE table_train_107 ( "id" int, "systolic_blood_pressure_sbp" int, "body_weight" float, "modified_hachinski_ischemia_scale" int, "diastolic_blood_pressure_dbp" int, "body_mass_index_bmi" float, "clinical_dementia_rating_cdr" float, "NOUSE" float )
modified hachinski less than or equal to 4
SELECT * FROM table_train_107 WHERE modified_hachinski_ischemia_scale <= 4
CREATE TABLE table_train_277 ( "id" int, "gender" string, "cholesterol" float, "blood_platelet_counts" int, "creatinine_clearance_cl" float, "estimated_glomerular_filtration_rate_egfr" int, "severe_dyslipidemia" bool, "fasting_triglyceride" int, "body_mass_index_bmi" float, "trig...
creatinine level ( a measure of kidney function is greater than 1.4 mg / dl ( for female ) or greater than 1.5 mg / dl ( for male ) or your estimated gfr is under 60 .
SELECT * FROM table_train_277 WHERE (creatinine_clearance_cl > 1.4 AND gender = 'female') OR (creatinine_clearance_cl > 1.5 AND gender = 'male') OR estimated_glomerular_filtration_rate_egfr < 60
CREATE TABLE table_20963074_1 ( result VARCHAR, original_title VARCHAR )
Name the total number of results for octubre
SELECT COUNT(result) FROM table_20963074_1 WHERE original_title = "Octubre"
CREATE TABLE table_name_22 ( launched VARCHAR, commissioned VARCHAR, bow_number VARCHAR )
When did the ship that was commissioned July 1948 with a bow number of ps-31 launch?
SELECT launched FROM table_name_22 WHERE commissioned = "july 1948" AND bow_number = "ps-31"
CREATE TABLE table_44259 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Team points" real, "Opponent score" real, "Record" text, "Streak" text )
Which streak before game 12 had a team points larger than 113 on November 16?
SELECT "Streak" FROM table_44259 WHERE "Team points" > '113' AND "Game" < '12' AND "Date" = 'november 16'
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetake...
what are the new prescriptions of patient 021-111547 of today compared to the prescription yesterday?
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '021-111547') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medic...
CREATE TABLE table_18600760_13 ( ansi_code INTEGER )
What is the smallest ansi code?
SELECT MIN(ansi_code) FROM table_18600760_13
CREATE TABLE table_27359 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text )
What are the NFL Teams in College North Texas State?
SELECT "NFL Team" FROM table_27359 WHERE "College" = 'North Texas State'
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE l...
since 2102 patient 003-50177 has undergone antibiotics - cephalosporin in other hospitals?
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '003-50177' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '003-50177' AND patient.hospitaldischargetime IS NULL)) AND tr...
CREATE TABLE table_51165 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
WHAT DATE HAD A GAME SMALLER THAN 58, AND FROM BOSTON?
SELECT "Date" FROM table_51165 WHERE "Game" < '58' AND "Team" = 'boston'
CREATE TABLE table_40927 ( "From" real, "Goal" text, "Round 1" text, "Round 2" text, "Round 3" text, "Round 4" text, "Round 5" text, "Round 6+" text )
What is Round 4 when Round 6+ is triple, Round 5 is triple and Round 3 is single?
SELECT "Round 4" FROM table_40927 WHERE "Round 6+" = 'triple' AND "Round 5" = 'triple' AND "Round 3" = 'single'
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, ...
Top 200 users from Iran. Lists the top 200 users (ranked by reputation) that are located in Iran according to their profile information.
SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Iran%' ORDER BY Reputation DESC LIMIT 200
CREATE TABLE trip ( id number, duration number, start_date text, start_station_name text, start_station_id number, end_date text, end_station_name text, end_station_id number, bike_id number, subscription_type text, zip_code number ) CREATE TABLE station ( id number, ...
What are all the different start station names for a trip that lasted less than 100?
SELECT DISTINCT start_station_name FROM trip WHERE duration < 100
CREATE TABLE table_10432 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the date when Richmond was the home team?
SELECT "Date" FROM table_10432 WHERE "Home team" = 'richmond'
CREATE TABLE table_279 ( "car plates (since 1937)" text, "Voivodeship Separate city" text, "Capital" text, "Area in 1000km\u00b2 (1930)" text, "Population in 1000 (1931)" text )
List all areas within 1000 km in the city of Lubelskie?
SELECT "Area in 1000km\u00b2 (1930)" FROM table_279 WHERE "Voivodeship Separate city" = 'lubelskie'
CREATE TABLE table_name_60 ( events INTEGER, player VARCHAR, earnings___$__ VARCHAR )
Which Events have a Player of tom kite, and Earnings ($) smaller than 760,405?
SELECT AVG(events) FROM table_name_60 WHERE player = "tom kite" AND earnings___$__ < 760 OFFSET 405
CREATE TABLE table_1637981_7 ( detroit__dtw_ VARCHAR, grand_rapids__grr_ VARCHAR )
When Grand Rapids's fare was $377.29, what is the fare to Detroit?
SELECT detroit__dtw_ FROM table_1637981_7 WHERE grand_rapids__grr_ = "$377.29"
CREATE TABLE table_name_3 ( surface VARCHAR, opponent VARCHAR )
What was the surface for the opponent Marcos Baghdatis?
SELECT surface FROM table_name_3 WHERE opponent = "marcos baghdatis"