answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT COUNT(timeslot) FROM table_27987623_3 WHERE viewers__millions_ = "0.238"
How many timeslots had viewers of 0.238 million?
CREATE TABLE table_27987623_3 (timeslot VARCHAR, viewers__millions_ VARCHAR)
SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ENDODONT' AND course.number = 660 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2003
How many professors will teach ENDODONT 660 in the Summer of 2003 ?
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 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 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 gsi ( course_offering_id int, student_id int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req 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 semester ( semester_id int, semester varchar, year int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) 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 program_course ( program_id int, course_id int, workload int, category 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 area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar )
SELECT title FROM table_24938621_2 WHERE production_code = "3X5405"
What is the title of the episode with production code 3x5405?
CREATE TABLE table_24938621_2 (title VARCHAR, production_code VARCHAR)
SELECT episode FROM table_27987623_3 WHERE order = 1
Which episode was #1 in the order?
CREATE TABLE table_27987623_3 (episode VARCHAR, order VARCHAR)
SELECT scientific_pitch FROM table_name_33 WHERE helmholtz_pitch = "d"
What is the scientific pitch when the Helmholtz pitch is D?
CREATE TABLE table_name_33 ( scientific_pitch VARCHAR, helmholtz_pitch VARCHAR )
SELECT home_team FROM table_24949975_1 WHERE date = "5 October 2011"
Who as the home team for game on 5 october 2011?
CREATE TABLE table_24949975_1 (home_team VARCHAR, date VARCHAR)
SELECT density_in_2011___km²_ FROM table_2801442_1 WHERE population__2011_census_ = 2320529
What's the density in the district with 2320529 citizens in 2011?
CREATE TABLE table_2801442_1 (density_in_2011___km²_ VARCHAR, population__2011_census_ VARCHAR)
SELECT COUNT(caps) FROM table_name_6 WHERE position = "prop" AND player = "rui cordeiro"
How many caps have a Position of prop, and a Player of rui cordeiro?
CREATE TABLE table_name_6 ( caps VARCHAR, position VARCHAR, player VARCHAR )
SELECT stadium FROM table_24949975_1 WHERE home_team = "Shamrock Rovers" AND result = "3–0"
What was the stadium for the home team of shamrock rovers and result of 3–0?
CREATE TABLE table_24949975_1 (stadium VARCHAR, home_team VARCHAR, result VARCHAR)
SELECT code FROM table_2801442_1 WHERE population__2011_census_ = 312520
What's the code of the district in which 312520 people lived in 2011?
CREATE TABLE table_2801442_1 (code VARCHAR, population__2011_census_ VARCHAR)
SELECT realization FROM table_name_5 WHERE phoneme = "/i/" AND example = "/idːa/"
Name the realization for phoneme of /i/ and example of /id a/
CREATE TABLE table_name_5 ( realization VARCHAR, phoneme VARCHAR, example VARCHAR )
SELECT away_team FROM table_24949975_1 WHERE result = "2–1" AND home_team = "Bohemians"
What was the away team when the result was 2–1 and home team was the bohemians?
CREATE TABLE table_24949975_1 (away_team VARCHAR, result VARCHAR, home_team VARCHAR)
SELECT code FROM table_2801442_1 WHERE density_in_2011___km²_ = "800.5"
What's the code of the district with 800.5 people per km2?
CREATE TABLE table_2801442_1 (code VARCHAR, density_in_2011___km²_ VARCHAR)
SELECT SUM("Attendance") FROM table_14131 WHERE "Games" < '6' AND "W-L-T" = '3-2-0' AND "Season" < '1948'
How much Attendance has Games smaller than 6, and a W-L-T of 3-2-0, and a Season smaller than 1948?
CREATE TABLE table_14131 ( "Season" real, "Games" real, "W-L-T" text, "Attendance" real, "Average" real )
SELECT home_team FROM table_24949975_1 WHERE season = "2013" AND result = "0–0"
Who was the home team for the 2013 season and the result was 0–0?
CREATE TABLE table_24949975_1 (home_team VARCHAR, season VARCHAR, result VARCHAR)
SELECT MIN(population__2011_census_) FROM table_2801442_1 WHERE code = "GP"
How many people lived in the district with a code GP in 2011?
CREATE TABLE table_2801442_1 (population__2011_census_ INTEGER, code VARCHAR)
SELECT AVG(year) FROM table_name_60 WHERE certification = "2x platinum" AND álbum = "xuxa 3" AND sales > 750 OFFSET 000
What was the average year that Xuxa 3 earned the certification 2x platinum, and that the sales were higher than 750,000?
CREATE TABLE table_name_60 ( year INTEGER, sales VARCHAR, certification VARCHAR, álbum VARCHAR )
SELECT date FROM table_24949975_1 WHERE stadium = "Tallaght stadium" AND result = "0–1"
What is the date for the game at the tallaght stadium and result was 0–1?
CREATE TABLE table_24949975_1 (date VARCHAR, stadium VARCHAR, result VARCHAR)
SELECT population__2001_census_ FROM table_2801442_1 WHERE headquarters = "Bhubaneswar"
How many people lived in the district whose headquarters is in Bhubaneswar in 2001?
CREATE TABLE table_2801442_1 (population__2001_census_ VARCHAR, headquarters VARCHAR)
SELECT original_air_date FROM table_28089666_1 WHERE production_code = "5.05"
What original air date was the episode with production code of 5.05?
CREATE TABLE table_28089666_1 ( original_air_date VARCHAR, production_code VARCHAR )
SELECT opponent FROM table_24951872_2 WHERE game_site = "Waldstadion"
What opponents played Waldstadion in a game?
CREATE TABLE table_24951872_2 (opponent VARCHAR, game_site VARCHAR)
SELECT MIN(area__km²_) FROM table_2801442_1 WHERE code = "BW"
How big (in km2) is the district with a code BW?
CREATE TABLE table_2801442_1 (area__km²_ INTEGER, code VARCHAR)
SELECT UserId AS "user_link", COUNT(*) AS "times_hammered" FROM PostHistory AS ph INNER JOIN PostLinks AS pl ON pl.PostId = ph.PostId INNER JOIN Posts AS p ON p.Id = pl.RelatedPostId WHERE PostHistoryTypeId = 10 AND ph.UserId != -1 AND Text LIKE '%GoldTagBadge%' AND LinkTypeId = 3 GROUP BY UserId ORDER BY COUNT(*) DESC
Users that dupe voted questions against their own question. https://meta.stackoverflow.com/questions/367459/how-to-use-gold-dupehammer-without-abuse
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 PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description 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 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 ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) 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 PostHistoryTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTypes ( Id number, Name 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 Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) 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 Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description 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 )
SELECT MAX(week) FROM table_24951872_2 WHERE attendance = 10738
What was the maximum week that had attendance of 10738?
CREATE TABLE table_24951872_2 (week INTEGER, attendance VARCHAR)
SELECT MIN(no_in_season) FROM table_28014096_1 WHERE production_code = "2T6206"
What is the number of this season's episode that had the production code 2t6206?
CREATE TABLE table_28014096_1 (no_in_season INTEGER, production_code VARCHAR)
SELECT "Score" FROM table_59953 WHERE "To par" > '17' AND "Player" = 'mike brady'
Which Score has a To par larger than 17, and a Player of mike brady?
CREATE TABLE table_59953 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" real )
SELECT production_code FROM table_24938621_3 WHERE written_by = "Cathryn Humphris"
What is the production code of the episode written by Cathryn Humphris?
CREATE TABLE table_24938621_3 (production_code VARCHAR, written_by VARCHAR)
SELECT MIN(series__number) FROM table_28019988_5 WHERE production_code = "BDF409"
What episode number of the series had a production code of bdf409?
CREATE TABLE table_28019988_5 (series__number INTEGER, production_code VARCHAR)
SELECT settlement FROM table_2562572_30 WHERE cyrillic_name_other_names = "Сигет"
Which settlement has the cyrillic name ?
CREATE TABLE table_2562572_30 ( settlement VARCHAR, cyrillic_name_other_names VARCHAR )
SELECT production_code FROM table_24938621_3 WHERE us_viewers__million_ = "5.43"
What is the production code of the episode that had 5.43 million viewers?
CREATE TABLE table_24938621_3 (production_code VARCHAR, us_viewers__million_ VARCHAR)
SELECT MAX(season__number) FROM table_28019988_5 WHERE us_viewers__million_ = "2.31" AND written_by = "Tom Garrigus"
What episode number of the season was written by Tom Garrigus and had 2.31 million u.s. viewers?
CREATE TABLE table_28019988_5 (season__number INTEGER, us_viewers__million_ VARCHAR, written_by VARCHAR)
SELECT "Attendance" FROM table_44800 WHERE "Venue" = 'ryavallen'
Which Attendance that has a Venue of ryavallen?
CREATE TABLE table_44800 ( "Date" text, "Venue" text, "Opponents" text, "Score" text, "Comp" text, "Attendance" text )
SELECT production_code FROM table_24938621_3 WHERE directed_by = "Jesse Warn"
What was the title of the episode directed by Jesse Warn?
CREATE TABLE table_24938621_3 (production_code VARCHAR, directed_by VARCHAR)
SELECT MAX(series__number) FROM table_28019988_5
What is the highest numbered episode in the series?
CREATE TABLE table_28019988_5 (series__number INTEGER)
SELECT "County" FROM table_66299 WHERE "Mascot" = 'pacers'
Which County has a Mascot of pacers?
CREATE TABLE table_66299 ( "School" text, "Location" text, "Mascot" text, "Size" real, "IHSAA Class" text, "County" text )
SELECT no FROM table_24938621_3 WHERE written_by = "Gregg Hurwitz"
What episode number was written by Gregg Hurwitz?
CREATE TABLE table_24938621_3 (no VARCHAR, written_by VARCHAR)
SELECT MIN(series__number) FROM table_28019988_5 WHERE production_code = "BDF405"
What episode number in the series had a production code of bdf405?
CREATE TABLE table_28019988_5 (series__number INTEGER, production_code VARCHAR)
SELECT flange_thickness__mm_ FROM table_2071644_2 WHERE weight__kg_m_ = "19.9"
What is the flange thickness when the weight is 19.9?
CREATE TABLE table_2071644_2 ( flange_thickness__mm_ VARCHAR, weight__kg_m_ VARCHAR )
SELECT drying_shrinkage___percentage_ FROM table_24969173_1 WHERE dry_density__kg_m3_ = 800
If the dry density is 800, what is the drying shrinkage %?
CREATE TABLE table_24969173_1 (drying_shrinkage___percentage_ VARCHAR, dry_density__kg_m3_ VARCHAR)
SELECT operator FROM table_28035004_1 WHERE bodybuilder = "Roe"
Who is the operator when Roe was the bodybuilder?
CREATE TABLE table_28035004_1 (operator VARCHAR, bodybuilder VARCHAR)
SELECT V.PostId AS "post_link", V.CreationDate AS "accept_date", A.CreationDate AS "question_date", CAST((JULIANDAY(V.CreationDate) - JULIANDAY(A.CreationDate)) * 86400.0 AS INT) AS "difference" FROM Votes AS V INNER JOIN Posts AS A ON (V.PostId = A.Id AND A.PostTypeId = 2) WHERE V.VoteTypeId = 1 ORDER BY 'difference' DESC LIMIT 100
Longest gaps between answer posting and acceptance.
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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( 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 PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description 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 ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE VoteTypes ( Id number, Name text ) 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 ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) 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 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 TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number )
SELECT series__number FROM table_24961421_1 WHERE season__number = 7
What number in the series was episode 7 in the season?
CREATE TABLE table_24961421_1 (series__number VARCHAR, season__number VARCHAR)
SELECT variant FROM table_28035004_1 WHERE bodybuilder = "Alexander"
What is the variant when Alexander was the bodybuilder?
CREATE TABLE table_28035004_1 (variant VARCHAR, bodybuilder VARCHAR)
SELECT COUNT(socket) FROM table_24538587_11 WHERE brand_name__list_ = "Core i3-2xx7M"
How many sockets are listed that have a brand name of 'Core i3-2xx7m'?
CREATE TABLE table_24538587_11 ( socket VARCHAR, brand_name__list_ VARCHAR )
SELECT written_by FROM table_24961421_1 WHERE us_viewers__millions_ = "12.15"
Who wrote the episode that had 12.15 million viewers?
CREATE TABLE table_24961421_1 (written_by VARCHAR, us_viewers__millions_ VARCHAR)
SELECT bodybuilder FROM table_28035004_1 WHERE operator = "Coventry"
Who was the bodybuilder when Coventry was operating?
CREATE TABLE table_28035004_1 (bodybuilder VARCHAR, operator VARCHAR)
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'atherosclerosis nec') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2104') AS t1 JOIN (SELECT admissions.subject_id, labevents.itemid, labevents.charttime FROM labevents JOIN admissions ON labevents.hadm_id = admissions.hadm_id WHERE STRFTIME('%y', labevents.charttime) >= '2104') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t1.charttime, 'start of month') = DATETIME(t2.charttime, 'start of month') GROUP BY t2.itemid) AS t3 WHERE t3.c1 <= 4)
since 2104, what are the top four most frequently given lab tests to patients in the same month after they were diagnosed with atherosclerosis nec?
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 text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) 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 d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) 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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) 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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number )
SELECT season__number FROM table_24961421_1 WHERE us_viewers__millions_ = "12.23"
What number in the season was the episode with 12.23 million viewers?
CREATE TABLE table_24961421_1 (season__number VARCHAR, us_viewers__millions_ VARCHAR)
SELECT COUNT(variant) FROM table_28035004_1 WHERE bodybuilder = "Northern Counties"
How many different variants are there for Northern Counties bodybuilder?
CREATE TABLE table_28035004_1 (variant VARCHAR, bodybuilder VARCHAR)
SELECT title FROM table_27911342_1 WHERE season__number = 5
What is the title of the Series 40 Season 5 show?
CREATE TABLE table_27911342_1 ( title VARCHAR, season__number VARCHAR )
SELECT date FROM table_24989925_2 WHERE game_site = "Olympic Stadium"
What is the date of the game at Olympic Stadium?
CREATE TABLE table_24989925_2 (date VARCHAR, game_site VARCHAR)
SELECT operator FROM table_28035004_1 WHERE bodybuilder = "Willowbrook"
Who is the operator when willowbrook was the bodybuilder?
CREATE TABLE table_28035004_1 (operator VARCHAR, bodybuilder VARCHAR)
SELECT AVG("Population") FROM table_44401 WHERE "Area (in km 2 )" > '9,826,675' AND "Emission / Person" < '14.9'
If the area of a country is over 9,826,675 kilometers and a total of emissions per person less than 14.9, what's the average Population found?
CREATE TABLE table_44401 ( "Country" text, "CO2 emissions" text, "Area (in km 2 )" real, "Population" real, "Emission / Person" real )
SELECT MAX(week) FROM table_24989925_2
How many weeks total are there?
CREATE TABLE table_24989925_2 (week INTEGER)
SELECT COUNT(eliminated_from_competition) FROM table_28068063_3 WHERE points_margin = 48
How many teams had a point margin of 48?
CREATE TABLE table_28068063_3 (eliminated_from_competition VARCHAR, points_margin VARCHAR)
SELECT "Recipient(s)" FROM table_71295 WHERE "Result" = 'nominated' AND "Category" = 'most popular drama' AND "Year" > '2004'
Who was the recipient when the show was nominated for Most Popular Drama after 2004?
CREATE TABLE table_71295 ( "Year" real, "Award Show" text, "Category" text, "Recipient(s)" text, "Result" text )
SELECT team_record FROM table_24989925_2 WHERE game_site = "RheinEnergieStadion"
What was the team's record when they played at Rheinenergiestadion?
CREATE TABLE table_24989925_2 (team_record VARCHAR, game_site VARCHAR)
SELECT COUNT(match_points) FROM table_28068063_3 WHERE eliminated_from_competition = "Béziers"
How many teams eliminated béziers from competition?
CREATE TABLE table_28068063_3 (match_points VARCHAR, eliminated_from_competition VARCHAR)
SELECT AVG("Points") FROM table_70167 WHERE "Year" < '1955'
What is the average Points for a year before 1955?
CREATE TABLE table_70167 ( "Year" real, "Team" text, "Chassis" text, "Engine" text, "Points" real )
SELECT MIN(09 AS _10_oi_2nd) FROM table_24990183_6
What is the lowest overall number of 09-10 oi 2nd?
CREATE TABLE table_24990183_6 (Id VARCHAR)
SELECT eliminated_from_competition FROM table_28068063_3 WHERE proceed_to_quarter_final = "Pau"
Who was eliminated from the competition when pau proceed to the quarter final?
CREATE TABLE table_28068063_3 (eliminated_from_competition VARCHAR, proceed_to_quarter_final VARCHAR)
SELECT "Copies per particle" FROM table_925 WHERE "Function" = 'Enterotoxin'
How many copies per particle are created by the enterotoxin?
CREATE TABLE table_925 ( "RNA Segment (Gene)" real, "Size ( s base pair )" real, "Protein" text, "Molecular weight kDa" text, "Location" text, "Copies per particle" text, "Function" text )
SELECT MAX(09 AS _10_i_o_best) FROM table_24990183_4
What was the maximum 09-10 i/o best?
CREATE TABLE table_24990183_4 (Id VARCHAR)
SELECT eliminated_from_competition FROM table_28068063_3 WHERE proceed_to_quarter_final = "Connacht"
Who was eliminated from the competition when connacht to the quarter final?
CREATE TABLE table_28068063_3 (eliminated_from_competition VARCHAR, proceed_to_quarter_final VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Other partial resection of small intestine"
how many patients are admitted under emergency and procedured with other partial resection of intestine?
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT name FROM table_24990183_7 WHERE rank = 17
If the rank is 17, what are the names?
CREATE TABLE table_24990183_7 (name VARCHAR, rank VARCHAR)
SELECT proceed_to_quarter_final FROM table_28068063_3 WHERE eliminated_from_competition = "London Irish"
Who proceeded to the quarter final when the london irish were eliminated from competition?
CREATE TABLE table_28068063_3 (proceed_to_quarter_final VARCHAR, eliminated_from_competition VARCHAR)
SELECT "Competition" FROM table_50655 WHERE "Result" = '2-1'
what is the competition when the result is 2-1?
CREATE TABLE table_50655 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT 08 AS _09_gp_jgp_2nd FROM table_24990183_7 WHERE ws_points = 947
If the WS points is 947, what is the 08-09 gp/jgp 2nd ?
CREATE TABLE table_24990183_7 (ws_points VARCHAR)
SELECT aggregate_score FROM table_28068063_2 WHERE winners = "Brive"
What was the aggregate score for the match won by Brive?
CREATE TABLE table_28068063_2 (aggregate_score VARCHAR, winners VARCHAR)
SELECT formula FROM table_23548160_1 WHERE driver = "Stirling Moss"
What type of formula did Stirling Moss drive?
CREATE TABLE table_23548160_1 ( formula VARCHAR, driver VARCHAR )
SELECT points FROM table_24998088_1 WHERE position = "34th"
How many points did he have when he has in the 34th position?
CREATE TABLE table_24998088_1 (points VARCHAR, position VARCHAR)
SELECT match_points FROM table_28068063_2 WHERE winners = "Connacht"
What was the match points score for the match won by Connacht?
CREATE TABLE table_28068063_2 (match_points VARCHAR, winners VARCHAR)
SELECT "Opponent" FROM table_15153 WHERE "Attendance" > '50,522' AND "Record" = '80-63'
Which Opponent has an attendance greater than 50,522, and a record of 80-63?
CREATE TABLE table_15153 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT wins FROM table_24998088_1 WHERE points = "112"
How many wins were listed when he had 112 points?
CREATE TABLE table_24998088_1 (wins VARCHAR, points VARCHAR)
SELECT aggregate_score FROM table_28068063_2 WHERE winners = "Viadana"
What was the aggregate score for the match won by Viadana?
CREATE TABLE table_28068063_2 (aggregate_score VARCHAR, winners VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "68" AND lab.fluid = "Blood"
Find the number of patients less than 68 years of age who had blood tests done.
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT series FROM table_24998088_1 WHERE position = "7th"
In what series did he have the 7th position?
CREATE TABLE table_24998088_1 (series VARCHAR, position VARCHAR)
SELECT cfl_team FROM table_28059992_2 WHERE player = "Patrice Denis"
Name the cfl team for patrice denis
CREATE TABLE table_28059992_2 (cfl_team VARCHAR, player VARCHAR)
SELECT record FROM table_name_44 WHERE date = "april 1"
What was the record on April 1?
CREATE TABLE table_name_44 ( record VARCHAR, date VARCHAR )
SELECT points FROM table_24998088_1 WHERE position = "8th"
what were his points when he was in 8th position?
CREATE TABLE table_24998088_1 (points VARCHAR, position VARCHAR)
SELECT cfl_team FROM table_28059992_2 WHERE player = "Robert Beveridge"
Name the cfl team for robert beveridge
CREATE TABLE table_28059992_2 (cfl_team VARCHAR, player VARCHAR)
SELECT status, AVG(population) FROM city GROUP BY status
Please show the different statuses of cities and the average population of cities with each status.
CREATE TABLE competition_record ( competition_id number, farm_id number, rank number ) CREATE TABLE farm ( farm_id number, year number, total_horses number, working_horses number, total_cattle number, oxen number, bulls number, cows number, pigs number, sheep_and_goats number ) CREATE TABLE farm_competition ( competition_id number, year number, theme text, host_city_id number, hosts text ) CREATE TABLE city ( city_id number, official_name text, status text, area_km_2 number, population number, census_ranking text )
SELECT vote FROM table_25016824_2 WHERE air_date = "4 October 1997"
What was the vote when the air date is 4 october 1997?
CREATE TABLE table_25016824_2 (vote VARCHAR, air_date VARCHAR)
SELECT college FROM table_28059992_2 WHERE position = "DL"
Name the college for dl
CREATE TABLE table_28059992_2 (college VARCHAR, position VARCHAR)
SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
Return a bar chart on what are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?
CREATE TABLE store_district ( Store_ID int, District_ID int ) CREATE TABLE store_product ( Store_ID int, Product_ID int ) CREATE TABLE product ( product_id int, product text, dimensions text, dpi real, pages_per_minute_color real, max_page_size text, interface text ) CREATE TABLE district ( District_ID int, District_name text, Headquartered_City text, City_Population real, City_Area real ) CREATE TABLE store ( Store_ID int, Store_Name text, Type text, Area_size real, Number_of_product_category real, Ranking int )
SELECT eliminated FROM table_25016824_2 WHERE immunity = "Kent (Jürgen)"
Who was eliminated when immunity went to kent (jürgen)?
CREATE TABLE table_25016824_2 (eliminated VARCHAR, immunity VARCHAR)
SELECT COUNT(college) FROM table_28059992_2 WHERE player = "Jerome Pathon"
Name the number of colleges for jerome pathon
CREATE TABLE table_28059992_2 (college VARCHAR, player VARCHAR)
SELECT vehicle FROM table_20549371_3 WHERE epa_rated_highway_fuel_economy = "109 mpg-e"
What vehicle has an epa highway fuel economy of 109 mpg-e?
CREATE TABLE table_20549371_3 ( vehicle VARCHAR, epa_rated_highway_fuel_economy VARCHAR )
SELECT eliminated FROM table_25016824_2 WHERE vote = "8-1"
Who was eliminated when the vote was 8-1?
CREATE TABLE table_25016824_2 (eliminated VARCHAR, vote VARCHAR)
SELECT COUNT(cfl_team) FROM table_28059992_2 WHERE player = "Jeff Traversy"
Name the number of cfl teams for jeff traversy
CREATE TABLE table_28059992_2 (cfl_team VARCHAR, player VARCHAR)
SELECT gender, SUM(student_capacity) FROM Dorm GROUP BY gender ORDER BY SUM(student_capacity) DESC
What is the total capacity of dorms for each gender? Give me a bar chart, sort by the y-axis in descending.
CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER )
SELECT COUNT(vote) FROM table_25016824_2 WHERE air_date = "15 November 1997"
How many entries are there for vote when the air date was 15 november 1997?
CREATE TABLE table_25016824_2 (vote VARCHAR, air_date VARCHAR)
SELECT position FROM table_28059992_2 WHERE college = "British Columbia"
Name the position for british columbia
CREATE TABLE table_28059992_2 (position VARCHAR, college VARCHAR)
SELECT COUNT(*) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'HHCR' AND course.number = 700 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
For the next semester , how many lecture sections are offered for HHCR 700 ?
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id 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 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 ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE area ( course_id int, area 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 comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) 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 program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int )
SELECT reward FROM table_25016824_2 WHERE immunity = "Martin" AND finish = "13th voted Out 8th Jury Member Day 46"
What was the reward when immunity went to martin and finish is 13th voted out 8th jury member day 46?
CREATE TABLE table_25016824_2 (reward VARCHAR, immunity VARCHAR, finish VARCHAR)
SELECT original_air_date FROM table_28089666_1 WHERE production_code = "5.05"
What original air date was the episode with production code of 5.05?
CREATE TABLE table_28089666_1 (original_air_date VARCHAR, production_code VARCHAR)
SELECT tournament FROM table_name_68 WHERE finalist = "greg rusedski"
What tournament had Greg Rusedski as a finalist?
CREATE TABLE table_name_68 ( tournament VARCHAR, finalist VARCHAR )
SELECT COUNT(macedonian) FROM table_25008327_8 WHERE slovianski = "veliki"
How many values for Macedonian correspond to Slovianski value of Veliki?
CREATE TABLE table_25008327_8 (macedonian VARCHAR, slovianski VARCHAR)
SELECT written_by FROM table_28089666_1 WHERE production_code = "1.01"
Who wrote episode with production code 1.01?
CREATE TABLE table_28089666_1 (written_by VARCHAR, production_code VARCHAR)