answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT COUNT(no_in_season) FROM table_name_73 WHERE directed_by = "robert berlinger" AND no_in_series = 30
What is the total number in the season for the #30 Robert Berlinger series?
CREATE TABLE table_name_73 (no_in_season VARCHAR, directed_by VARCHAR, no_in_series VARCHAR)
SELECT location_attendance FROM table_22883210_7 WHERE game = 41
Where was game 41 held, and how many people attended?
CREATE TABLE table_22883210_7 (location_attendance VARCHAR, game VARCHAR)
SELECT candidates FROM table_1342233_11 WHERE district = "Georgia 4"
What candidate is associated with the Georgia 4 district?
CREATE TABLE table_1342233_11 ( candidates VARCHAR, district VARCHAR )
SELECT original_air_date FROM table_name_84 WHERE title = "julie gets validated"
When did Julie gets Validated originally air?
CREATE TABLE table_name_84 (original_air_date VARCHAR, title VARCHAR)
SELECT date FROM table_22883210_7 WHERE record = "23-13"
What was the date for the record 23-13?
CREATE TABLE table_22883210_7 (date VARCHAR, record VARCHAR)
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"
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 text, admittime text, dischtime text, admityear 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, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT written_by FROM table_name_36 WHERE no_in_series = 24
Who was the number 24 series written by?
CREATE TABLE table_name_36 (written_by VARCHAR, no_in_series VARCHAR)
SELECT high_points FROM table_22883210_7 WHERE date = "January 20"
What was the high point for January 20?
CREATE TABLE table_22883210_7 (high_points VARCHAR, date VARCHAR)
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"
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 original_air_date FROM table_name_87 WHERE written_by = "boyd hale" AND title = "julie gets validated"
When did Boyd Hale's Julie gets Validated originally air?
CREATE TABLE table_name_87 (original_air_date VARCHAR, written_by VARCHAR, title VARCHAR)
SELECT location_attendance FROM table_22883210_9 WHERE team = "Golden State"
What was the location and how many attended when Golden State played?
CREATE TABLE table_22883210_9 (location_attendance VARCHAR, team VARCHAR)
SELECT "Race Name" FROM table_56809 WHERE "Winning driver" = 'stirling moss' AND "Date" = '16 april'
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 queens FROM table_name_57 WHERE brooklyn = "201,866"
What was the Queens number when Brooklyn was 201,866?
CREATE TABLE table_name_57 (queens VARCHAR, brooklyn VARCHAR)
SELECT MAX(game) FROM table_22883210_9 WHERE team = "Cleveland"
What is the highest game number where the team was Cleveland?
CREATE TABLE table_22883210_9 (game INTEGER, team VARCHAR)
SELECT payload_to_gto FROM table_name_95 WHERE ccbs > 1 AND payload_to_leo = "29,400kg"
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 manhattan FROM table_name_21 WHERE richmond_[staten_is] = "78%"
Which Manhattan number appeared when Richmond (Staten Island) was 78%?
CREATE TABLE table_name_21 (manhattan VARCHAR, richmond_ VARCHAR, staten_is VARCHAR)
SELECT MAX(nightly_rank) FROM table_22892217_4
What is the highest numbered nightly rank for any episode?
CREATE TABLE table_22892217_4 (nightly_rank INTEGER)
SELECT "2010" FROM table_34431 WHERE "2006" = 'w'
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 home_team AS score FROM table_name_61 WHERE away_team = "fitzroy"
What did the home team score against Fitzroy?
CREATE TABLE table_name_61 (home_team VARCHAR, away_team VARCHAR)
SELECT COUNT(location_attendance) FROM table_22893781_5 WHERE date = "December 2"
How many attended on december 2?
CREATE TABLE table_22893781_5 (location_attendance VARCHAR, date VARCHAR)
SELECT MAX(against) FROM table_name_85 WHERE lost < 20 AND draw > 2 AND favour < 11
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 opponent FROM table_name_24 WHERE week = 2
Who is the listed opponent in Week 2?
CREATE TABLE table_name_24 (opponent VARCHAR, week VARCHAR)
SELECT team FROM table_22893781_5 WHERE date = "December 11"
Who was he opponent on december 11?
CREATE TABLE table_22893781_5 (team VARCHAR, date VARCHAR)
SELECT COUNT("best dancer(s)") FROM table_204_711 WHERE "best score" >= 40
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 date FROM table_name_11 WHERE attendance = "45,024"
What date has attendance listed as 45,024?
CREATE TABLE table_name_11 (date VARCHAR, attendance VARCHAR)
SELECT score FROM table_22893781_5 WHERE team = "Houston"
What was the score against houston?
CREATE TABLE table_22893781_5 (score VARCHAR, team VARCHAR)
SELECT "Away team" FROM table_41718 WHERE "Home team" = 'coventry city'
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 SUM(pick__number) FROM table_name_82 WHERE rd__number < 11 AND player = "mattias ohlund" AND pl_gp > 52
What numbered pick was mattias ohlund, with over 52 PL GP, and also a round under 11?
CREATE TABLE table_name_82 (pick__number INTEGER, pl_gp VARCHAR, rd__number VARCHAR, player VARCHAR)
SELECT date FROM table_22893781_7 WHERE team = "@ Indiana"
when did the @ indiana game take place?
CREATE TABLE table_22893781_7 (date VARCHAR, team VARCHAR)
SELECT method FROM table_name_56 WHERE res = "win" AND opponent = "natsuko kikukawa"
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 COUNT(reg_gp) FROM table_name_35 WHERE player = "mattias ohlund"
How many reg GP for mattias ohlund?
CREATE TABLE table_name_35 (reg_gp VARCHAR, player VARCHAR)
SELECT score FROM table_22893781_6 WHERE location_attendance = "Madison Square Garden 18,828"
Name the score for madison square garden 18,828
CREATE TABLE table_22893781_6 (score VARCHAR, location_attendance VARCHAR)
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY School_ID
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, Enrollment real, Nickname text, Primary_conference text )
SELECT AVG(attendance) FROM table_name_57 WHERE opponent = "expos"
What is the average attendance against the expos?
CREATE TABLE table_name_57 (attendance INTEGER, opponent VARCHAR)
SELECT COUNT(date) FROM table_22893781_6 WHERE team = "Dallas"
Name the number of date for dallas
CREATE TABLE table_22893781_6 (date VARCHAR, team VARCHAR)
SELECT 2009 FROM table_name_44 WHERE 2010 = "1r" AND 2012 = "a" AND 2008 = "2r"
Name the 2009 ffor 2010 of 1r and 2012 of a and 2008 of 2r
CREATE TABLE table_name_44 ( Id VARCHAR )
SELECT record FROM table_name_11 WHERE date = "april 12"
What is the team's record on april 12?
CREATE TABLE table_name_11 (record VARCHAR, date VARCHAR)
SELECT high_assists FROM table_22893781_6 WHERE date = "January 15"
Name the high assists for january 15
CREATE TABLE table_22893781_6 (high_assists VARCHAR, date VARCHAR)
SELECT COUNT(date) FROM table_14934885_1 WHERE performer_3 = "Kate Robbins"
How many times was performer 3 Kate Robbins?
CREATE TABLE table_14934885_1 ( date VARCHAR, performer_3 VARCHAR )
SELECT opponent FROM table_name_2 WHERE date = "april 19"
Who did the team play on april 19?
CREATE TABLE table_name_2 (opponent VARCHAR, date VARCHAR)
SELECT title FROM table_228973_5 WHERE original_air_date = "November 10, 1998"
What is the name of the episode that aired originally on November 10, 1998?
CREATE TABLE table_228973_5 (title VARCHAR, original_air_date VARCHAR)
SELECT user_name, password FROM users GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1
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_structure_code text, document_structure_description text ) CREATE TABLE functional_areas ( functional_area_code text, parent_functional_area_code text, functional_area_description text ) CREATE TABLE documents ( document_code text, document_structure_code text, document_type_code text, access_count number, document_name text ) CREATE TABLE document_sections ( section_id number, document_code text, section_sequence number, section_code text, section_title text ) CREATE TABLE document_sections_images ( section_id number, image_id number ) CREATE TABLE images ( image_id number, image_alt_text text, image_name text, image_url text )
SELECT aspect FROM table_name_23 WHERE channel = 26.5
What is the Aspect of Channel 26.5?
CREATE TABLE table_name_23 (aspect VARCHAR, channel VARCHAR)
SELECT MAX(no_in_series) FROM table_228973_5 WHERE original_air_date = "April 27, 1999"
What episode number in the series originally aired on April 27, 1999?
CREATE TABLE table_228973_5 (no_in_series INTEGER, original_air_date VARCHAR)
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)
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 text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense 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 PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text )
SELECT programming FROM table_name_98 WHERE channel = 26.5
Which Programming is on Channel 26.5?
CREATE TABLE table_name_98 (programming VARCHAR, channel VARCHAR)
SELECT COUNT(written_by) FROM table_228973_5 WHERE no_in_series = 68
How many people wrote episode 68 in the series?
CREATE TABLE table_228973_5 (written_by VARCHAR, no_in_series VARCHAR)
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"
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 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 text, admittime text, dischtime text, admityear 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, short_title text, long_title text )
SELECT programming FROM table_name_89 WHERE channel < 26.5 AND video = "480i" AND psip_short_name = "jtv"
Which Programming is on a channel less than 26.5, has a Video of 480i and a PSIP Short Name of jtv?
CREATE TABLE table_name_89 (programming VARCHAR, psip_short_name VARCHAR, channel VARCHAR, video VARCHAR)
SELECT directed_by FROM table_228973_5 WHERE original_air_date = "February 16, 1999"
Who directed the episode that originally aired on February 16, 1999?
CREATE TABLE table_228973_5 (directed_by VARCHAR, original_air_date VARCHAR)
SELECT "Super B Capacity Reached [ citation needed ]" FROM table_17798 WHERE "Freight Carried s Tonne" = '198818'
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 laps FROM table_name_56 WHERE driver = "ronnie peterson"
What number of laps were done by driver Ronnie Peterson?
CREATE TABLE table_name_56 (laps VARCHAR, driver VARCHAR)
SELECT no_in_season FROM table_228973_11 WHERE original_air_date = "February 11, 2005"
The episode which originally aired on February 11, 2005 had which episode # of the season?
CREATE TABLE table_228973_11 (no_in_season VARCHAR, original_air_date VARCHAR)
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
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), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) )
SELECT driver FROM table_name_2 WHERE time_retired = "fuel system"
Which driver had a time/retired of fuel system?
CREATE TABLE table_name_2 (driver VARCHAR, time_retired VARCHAR)
SELECT written_by FROM table_228973_11 WHERE original_air_date = "December 17, 2004"
The episode which originally aired on December 17, 2004 was written by whom?
CREATE TABLE table_228973_11 (written_by VARCHAR, original_air_date VARCHAR)
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
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 program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) 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 int, easiness_score int, helpfulness_score int ) 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 ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) 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 offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip 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, friday varchar, saturday varchar, sunday varchar, has_final_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar )
SELECT SUM(grid) FROM table_name_27 WHERE time_retired = "engine" AND laps < 45 AND driver = "giancarlo baghetti"
What is the sum of grids with an engine in Time/Retired with less than 45 laps for Giancarlo Baghetti?
CREATE TABLE table_name_27 (grid INTEGER, driver VARCHAR, time_retired VARCHAR, laps VARCHAR)
SELECT no_in_series FROM table_228973_11 WHERE directed_by = "David James Elliott"
David James Elliott directed which episode number within the series?
CREATE TABLE table_228973_11 (no_in_series VARCHAR, directed_by VARCHAR)
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'
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 number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) 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 microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time )
SELECT grid FROM table_name_97 WHERE laps = 35
I want the Grid for Laps of 35
CREATE TABLE table_name_97 (grid VARCHAR, laps VARCHAR)
SELECT directed_by FROM table_228973_11 WHERE original_air_date = "February 4, 2005"
Who directed the episode which originally aired February 4, 2005?
CREATE TABLE table_228973_11 (directed_by VARCHAR, original_air_date VARCHAR)
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 = 'CLEVELAND' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.flight_days = 'DAILY'
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_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE month ( month_number int, month_name 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, stops int, time_elapsed int, to_airport varchar ) 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 time_interval ( period text, begin_time int, end_time int ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_miles int, pressurized varchar ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar )
SELECT batting_style FROM table_name_95 WHERE player = "jonty rhodes"
What is Jonty Rhodes's batting style?
CREATE TABLE table_name_95 (batting_style VARCHAR, player VARCHAR)
SELECT COUNT(no_in_season) FROM table_228973_3 WHERE original_air_date = "January 3, 1997"
which is the number of the season episode whose premiere was in january 3, 1997?
CREATE TABLE table_228973_3 (no_in_season VARCHAR, original_air_date VARCHAR)
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 course.name LIKE '%Global Sustainable Enterprise%') AND program_course.category LIKE '%Other%'
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 TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip 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, friday varchar, saturday varchar, sunday varchar, has_final_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) 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 int, easiness_score int, helpfulness_score int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int ) 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 instructor ( instructor_id int, name varchar, uniqname varchar ) 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 program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar )
SELECT bowling_style FROM table_name_52 WHERE first_class_team = "griqualand west"
What bowling style does First Class Team, Griqualand West have?
CREATE TABLE table_name_52 (bowling_style VARCHAR, first_class_team VARCHAR)
SELECT no_in_season FROM table_228973_3 WHERE written_by = "R. Scott Gemmill" AND directed_by = "Ray Austin"
which is the number of the season episode whose writer is R. Scott Gemmill and the Director is Ray Austin?
CREATE TABLE table_228973_3 (no_in_season VARCHAR, written_by VARCHAR, directed_by VARCHAR)
SELECT "Season #" FROM table_25897 WHERE "Production code" = '5M21'
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 batting_style FROM table_name_85 WHERE player = "makhaya ntini"
What is the batting style of Makhaya Ntini?
CREATE TABLE table_name_85 (batting_style VARCHAR, player VARCHAR)
SELECT title FROM table_228973_3 WHERE no_in_series = 31
what is the name of the episode whose number of the series episode was 31?
CREATE TABLE table_228973_3 (title VARCHAR, no_in_series VARCHAR)
SELECT "Date" FROM table_33044 WHERE "Away team score" = '12.9 (81)'
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 region FROM table_name_1 WHERE host = "university of southern california"
What region is the host university of southern california located?
CREATE TABLE table_name_1 (region VARCHAR, host VARCHAR)
SELECT written_by FROM table_228973_7 WHERE no_in_series = 129
When 129 is the number in the series who is the writer?
CREATE TABLE table_228973_7 (written_by VARCHAR, no_in_series VARCHAR)
SELECT "Date" FROM table_13949 WHERE "Tournament" = 'acapulco'
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 state FROM table_name_81 WHERE city = "knoxville"
In which state is the city of knoxville?
CREATE TABLE table_name_81 (state VARCHAR, city VARCHAR)
SELECT MAX(prod__number) FROM table_2289806_1 WHERE episode__number = 1
How many product # have episode 1?
CREATE TABLE table_2289806_1 (prod__number INTEGER, episode__number VARCHAR)
SELECT _percentage_0_19_years FROM table_29615165_5 WHERE quartier = "Saint-Loup"
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 city FROM table_name_58 WHERE state = "texas" AND venue = "frank erwin center"
Which city in Texas hosts the Frank Erwin center?
CREATE TABLE table_name_58 (city VARCHAR, state VARCHAR, venue VARCHAR)
SELECT windows_builders FROM table_22903426_1 WHERE name = "Apache Gump"
Name the windows builders for apache gump
CREATE TABLE table_22903426_1 (windows_builders VARCHAR, name VARCHAR)
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"
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 text, admittime text, dischtime text, admityear text ) 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 ( 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 )
SELECT region FROM table_name_36 WHERE city = "austin"
In what region is the city of Austin?
CREATE TABLE table_name_36 (region VARCHAR, city VARCHAR)
SELECT COUNT(scm_system) FROM table_22903426_1 WHERE windows_builders = "NAnt, Visual Studio"
Name the number of scm system for nant, visual studio
CREATE TABLE table_22903426_1 (scm_system VARCHAR, windows_builders VARCHAR)
SELECT area_km² FROM table_name_72 WHERE density__hab_km²_ = "955.6"
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 chuck_devore FROM table_name_97 WHERE other = "4%"
What is the polling result for Chuck DeVore which has a corresponding polling result of 4% for Other?
CREATE TABLE table_name_97 (chuck_devore VARCHAR, other VARCHAR)
SELECT COUNT(other_builders) FROM table_22903426_1 WHERE windows_builders = "NAnt, Visual Studio"
Name the number of other builders for nant, visual studio
CREATE TABLE table_22903426_1 (other_builders VARCHAR, windows_builders VARCHAR)
SELECT SUM(floors) FROM table_name_15 WHERE street_address = "32 n. main street"
How many floors are there at 32 n. main street?
CREATE TABLE table_name_15 ( floors INTEGER, street_address VARCHAR )
SELECT COUNT(total) FROM table_name_82 WHERE silver < 1 AND rank > 3
What is the total when silver is less than 1 and rank larger than 3?
CREATE TABLE table_name_82 (total VARCHAR, silver VARCHAR, rank VARCHAR)
SELECT MIN(2 AS nd_runner_up) FROM table_2290097_4
What is the minimum for 2nd runner-up?
CREATE TABLE table_2290097_4 (Id VARCHAR)
SELECT frequency_mhz FROM table_name_4 WHERE call_sign = "kamy"
Frequency for kamy?
CREATE TABLE table_name_4 ( frequency_mhz VARCHAR, call_sign VARCHAR )
SELECT SUM(bronze) FROM table_name_72 WHERE nation = "canada" AND silver < 0
What is the number of bronze for Canada and silver is less than 0?
CREATE TABLE table_name_72 (bronze INTEGER, nation VARCHAR, silver VARCHAR)
SELECT title FROM table_228973_9 WHERE original_air_date = "February 4, 2003"
If the original air date is February 4, 2003, what is the episode title?
CREATE TABLE table_228973_9 (title VARCHAR, original_air_date VARCHAR)
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 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 MAX(gold) FROM table_name_48 WHERE silver < 1 AND nation = "canada" AND bronze < 0
What is the largest gold when silver is less than 1 for Canada and bronze is less than 0?
CREATE TABLE table_name_48 (gold INTEGER, bronze VARCHAR, silver VARCHAR, nation VARCHAR)
SELECT no_in_series FROM table_228973_9 WHERE original_air_date = "April 1, 2003"
If the original air date is April 1, 2003, what number in the series is this episode?
CREATE TABLE table_228973_9 (no_in_series VARCHAR, original_air_date VARCHAR)
SELECT MAX("Prod. code") FROM table_74358 WHERE "Directed by" = 'Rondell Sheridan'
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 AVG(silver) FROM table_name_64 WHERE nation = "germany" AND rank < 2
What is the silver for Germany and less than 2?
CREATE TABLE table_name_64 (silver INTEGER, nation VARCHAR, rank VARCHAR)
SELECT MAX(no_in_series) FROM table_228973_9 WHERE directed_by = "Harvey S. Laidman"
What is the maximum number in the series for the episode directed by Harvey S. Laidman?
CREATE TABLE table_228973_9 (no_in_series INTEGER, directed_by VARCHAR)
SELECT login_name, author_tutor_ATB FROM Course_Authors_and_Tutors ORDER BY personal_name
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_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80), gender_mf VARCHAR(1), address_line_1 VARCHAR(80) )
SELECT score FROM table_name_4 WHERE date = "december 3"
Tell me the score for december 3
CREATE TABLE table_name_4 (score VARCHAR, date VARCHAR)