answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT transit_connections FROM table_22771048_2 WHERE station = "Pioneer Square U"
What are the transit connections from Pioneer Square U?
CREATE TABLE table_22771048_2 (transit_connections VARCHAR, station VARCHAR)
SELECT nationality FROM table_1965650_10 WHERE player = "Alain Labrecque"
What country is Alain Labrecque from?
CREATE TABLE table_1965650_10 (nationality VARCHAR, player VARCHAR)
SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id
What are the PreMajor classes ?
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 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 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 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 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 semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname 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 course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar )
SELECT transit_connections FROM table_22771048_2 WHERE city_neighborhood = "Columbia City, Seattle"
What's the transit connection in Columbia City, Seattle?
CREATE TABLE table_22771048_2 (transit_connections VARCHAR, city_neighborhood VARCHAR)
SELECT MIN(pick__number) FROM table_1965650_10 WHERE nhl_team = "Boston Bruins"
What is Boston Bruins minimum pick?
CREATE TABLE table_1965650_10 (pick__number INTEGER, nhl_team VARCHAR)
SELECT COUNT("party/electoral alliance") FROM table_204_982 WHERE "change" < 0
total number of parties who lost seats in the argentine chamber of deputies in the legislative election of 1930
CREATE TABLE table_204_982 ( id number, "party/electoral alliance" text, "seats" number, "change" number, "votes" number, "%" text )
SELECT pct_route_available FROM table_2279413_1 WHERE type_of_protection = "small patent"
For small patent type of protections, what type of PCT route is available?
CREATE TABLE table_2279413_1 (pct_route_available VARCHAR, type_of_protection VARCHAR)
SELECT position FROM table_1965650_2 WHERE player = "Glenn Goldup"
Name the position of glenn goldup
CREATE TABLE table_1965650_2 (position VARCHAR, player VARCHAR)
SELECT "Marriage" FROM table_69586 WHERE "Spouse" = 'christian viii'
Name the marriage of the person who is married for christian viii
CREATE TABLE table_69586 ( "Birth" text, "Marriage" text, "Became Consort" text, "Ceased to be Consort" text, "Death" text, "Spouse" text )
SELECT conversion_from_patent_application FROM table_2279413_1 WHERE country = "Tonga"
In Tonga, what is the conversion from patent application?
CREATE TABLE table_2279413_1 (conversion_from_patent_application VARCHAR, country VARCHAR)
SELECT MIN(pick__number) FROM table_1965650_2 WHERE player = "Colin Campbell"
Name the least pick number for colin campbell
CREATE TABLE table_1965650_2 (pick__number INTEGER, player VARCHAR)
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass"
Find the number of the enrollment date for all the tests that have 'Pass' result.
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 Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) 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) ) 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) )
SELECT pct_route_available FROM table_2279413_1 WHERE type_of_protection = "short patent"
For short patent type of protections, what type of PCT route is available?
CREATE TABLE table_2279413_1 (pct_route_available VARCHAR, type_of_protection VARCHAR)
SELECT player FROM table_1965650_2 WHERE pick__number = 30
Name the player for pick number for 30
CREATE TABLE table_1965650_2 (player VARCHAR, pick__number VARCHAR)
SELECT * FROM table_train_84 WHERE age >= 55 AND age <= 85
age between 55 _ 85 ;
CREATE TABLE table_train_84 ( "id" int, "gender" string, "mini_mental_state_examination_mmse" int, "modified_hachinski_ischemia_scale" int, "post_menopausal" bool, "allergy_to_rifaximin" bool, "surgically_sterilized" bool, "body_mass_index_bmi" float, "age" float, "NOUSE" float )
SELECT pct_route_available FROM table_2279413_1 WHERE country = "Tangier Zone"
In Tangier Zone, what is the PCT route availibility?
CREATE TABLE table_2279413_1 (pct_route_available VARCHAR, country VARCHAR)
SELECT college_junior_club_team FROM table_1965650_2 WHERE player = "Jimmy Jones"
Name the college/junior club team for jimmy jones
CREATE TABLE table_1965650_2 (college_junior_club_team VARCHAR, player 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.icd9_code = "9955"
provide the number of patients whose admission type is emergency and procedure icd9 code is 9955?
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 ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text )
SELECT conversion_from_patent_application FROM table_2279413_1 WHERE maximum_term = "10 years" AND pct_route_available = "Yes"
When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications?
CREATE TABLE table_2279413_1 (conversion_from_patent_application VARCHAR, maximum_term VARCHAR, pct_route_available VARCHAR)
SELECT mvp FROM table_19651669_1 WHERE champion = "Scaligera Verona"
Who was the MVP the season Scaligera Verona were Champions?
CREATE TABLE table_19651669_1 (mvp VARCHAR, champion VARCHAR)
SELECT length FROM table_name_68 WHERE version = "uk remix"
What is the length of the UK remix version?
CREATE TABLE table_name_68 ( length VARCHAR, version VARCHAR )
SELECT result FROM table_22801331_1 WHERE record = "6-2"
What was the result against the team which the Cowboys have a 6-2 record against?
CREATE TABLE table_22801331_1 (result VARCHAR, record VARCHAR)
SELECT finalist FROM table_19651669_1 WHERE season = "2007-08"
Who was the finalist in the season 2007-08?
CREATE TABLE table_19651669_1 (finalist VARCHAR, season VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.long_title = "Unspecified procedure as the cause of abnormal reaction of patient, or of later complication, without mention of misadventure at time of procedure"
provide the number of patients whose gender is m and diagnoses long title is unspecified procedure as the cause of abnormal reaction of patient, or of later complication, without mention of misadventure at time of procedure?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE 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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT MIN(opponents) FROM table_22801331_1 WHERE cowboys_points = 36
What is the fewest points opponents have scored when the Cowboys score 36?
CREATE TABLE table_22801331_1 (opponents INTEGER, cowboys_points VARCHAR)
SELECT finalist FROM table_19651669_1 WHERE final_venue = "Varese"
Who was the finalist when the final venue was Varese?
CREATE TABLE table_19651669_1 (finalist VARCHAR, final_venue VARCHAR)
SELECT location FROM table_name_1 WHERE circuit = "august 16"
What is Location, when Circuit is August 16?
CREATE TABLE table_name_1 ( location VARCHAR, circuit VARCHAR )
SELECT opponents FROM table_22801331_1 WHERE record = "1-0"
How many opponents have a 1-0 record against the Cowboys?
CREATE TABLE table_22801331_1 (opponents VARCHAR, record VARCHAR)
SELECT finalist FROM table_19651669_1 WHERE mvp = "Romain Sato"
Who was the finalist when the MVP was Romain Sato?
CREATE TABLE table_19651669_1 (finalist VARCHAR, mvp VARCHAR)
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-66713')) AND NOT vitalperiodic.heartrate IS NULL AND DATETIME(vitalperiodic.observationtime) <= DATETIME(CURRENT_TIME(), '-2100 day') ORDER BY vitalperiodic.heartrate, vitalperiodic.observationtime DESC LIMIT 1
when is the last time that patient 006-66713 had the minimum value of heartrate until 2100 days ago?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) 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 microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time )
SELECT game FROM table_22801331_1 WHERE record = "6-3"
What game was held against a team with a 6-3 record against the Cowboys?
CREATE TABLE table_22801331_1 (game VARCHAR, record VARCHAR)
SELECT champion FROM table_19651669_1 WHERE season = "1998-99"
Who was the champion for the 1998-99 season?
CREATE TABLE table_19651669_1 (champion VARCHAR, season VARCHAR)
SELECT COUNT(*) FROM fires WHERE county = "Gloucester" AND fire_size > 10
How many wildfires in Gloucester county have been larger than 10 acres?
CREATE TABLE fires ( fire_year number, discovery_date number, discovery_doy number, discovery_time text, stat_cause_code number, stat_cause_descr text, cont_date text, cont_doy text, cont_time text, fire_size number, fire_size_class text, latitude number, longitude number, owner_code number, owner_descr text, state text, county text, fips_code text, fips_name text )
SELECT COUnT AS name FROM table_22810095_8 WHERE country = "CIV"
How many names have a country of civ?
CREATE TABLE table_22810095_8 (COUnT VARCHAR, country VARCHAR)
SELECT COUNT(final_venue) FROM table_19651669_1 WHERE season = "1997-98"
How many final venues were there in the 1997-98 season?
CREATE TABLE table_19651669_1 (final_venue VARCHAR, season VARCHAR)
SELECT COUNT(*) FROM artwork
How many artworks are there?
CREATE TABLE artwork ( Id VARCHAR )
SELECT name FROM table_22810095_8 WHERE moving_from = "northampton Town"
Who moved from Northampton Town?
CREATE TABLE table_22810095_8 (name VARCHAR, moving_from VARCHAR)
SELECT player FROM table_1965650_7 WHERE nhl_team = "Detroit Red Wings"
What player was drafted to the Detroit Red Wings?
CREATE TABLE table_1965650_7 (player VARCHAR, nhl_team VARCHAR)
SELECT "Average" FROM table_4106 WHERE "County" = 'Lancashire' AND "100s" = '1'
What is the average for the player from Lancashire 1 100?
CREATE TABLE table_4106 ( "Player" text, "County" text, "Matches" real, "Innings" real, "Runs" real, "Average" text, "Highest Score" text, "100s" real, "50s" real )
SELECT moving_from FROM table_22810095_8 WHERE name = "Kisnorbo"
Where did Kisnorbo move from?
CREATE TABLE table_22810095_8 (moving_from VARCHAR, name VARCHAR)
SELECT college_junior_club_team FROM table_1965650_7 WHERE player = "Dan Follet"
Who did Dan Follet play for before the draft?
CREATE TABLE table_1965650_7 (college_junior_club_team VARCHAR, player VARCHAR)
SELECT shooter FROM table_name_75 WHERE total = "olympic bronze medalist"
Which shooter was the olympic bronze medalist?
CREATE TABLE table_name_75 ( shooter VARCHAR, total VARCHAR )
SELECT name FROM table_22810095_8 WHERE n = 28
What is the name of the player when n is 28?
CREATE TABLE table_22810095_8 (name VARCHAR, n VARCHAR)
SELECT COUNT(nhl_team) FROM table_1965650_7 WHERE player = "Denis Andersen"
How many teams have a player named Denis Andersen?
CREATE TABLE table_1965650_7 (nhl_team VARCHAR, player VARCHAR)
SELECT "Video" FROM table_64779 WHERE "Aspect" = '16:9'
Which video has a 16:9 aspect?
CREATE TABLE table_64779 ( "Channel" real, "Video" text, "Aspect" text, "PSIP Short Name" text, "Network" text )
SELECT transfer_fee FROM table_22810095_8 WHERE n = 2
How much was the transfer fee when n is 2?
CREATE TABLE table_22810095_8 (transfer_fee VARCHAR, n VARCHAR)
SELECT college_junior_club_team FROM table_1965650_7 WHERE nhl_team = "Buffalo Sabres"
Which College did the Buffalo Sabres' pick play for?
CREATE TABLE table_1965650_7 (college_junior_club_team VARCHAR, nhl_team VARCHAR)
SELECT "Function" FROM table_22163 WHERE "Version" = '1.4' AND "Title" = 'Windows Live Messenger'
What is the function of 1.4 version of Windows live messenger?
CREATE TABLE table_22163 ( "Title" text, "Developer" text, "Category" text, "Function" text, "Release date" text, "Version" text )
SELECT name FROM table_22810095_9 WHERE age = 24
What player is 24 years old?
CREATE TABLE table_22810095_9 (name VARCHAR, age VARCHAR)
SELECT nhl_team FROM table_1965650_8 WHERE player = "Denis Desgagnes"
What NHL team does Denis Desgagnes play for?
CREATE TABLE table_1965650_8 (nhl_team VARCHAR, player VARCHAR)
SELECT "To par" FROM table_60897 WHERE "Total" < '148' AND "Country" = 'south africa'
What is To par, when Total is less than 148, and when Country is 'South Africa'?
CREATE TABLE table_60897 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real )
SELECT COUNT(bruce_coulter_award) FROM table_228149_1 WHERE game = "9th"
Nam the total number for bruce coulter award for 9th game
CREATE TABLE table_228149_1 (bruce_coulter_award VARCHAR, game VARCHAR)
SELECT college_junior_club_team FROM table_1965650_8 WHERE player = "Bob Law"
What cub team or college did Bob Law come from?
CREATE TABLE table_1965650_8 (college_junior_club_team VARCHAR, player VARCHAR)
SELECT result FROM table_name_35 WHERE date = "may 9, 2012"
What was the result of the game played on May 9, 2012?
CREATE TABLE table_name_35 ( result VARCHAR, date VARCHAR )
SELECT MIN(opponents) FROM table_22815265_1 WHERE opponent = "Arizona State"
How many opponents were there when the opponent was Arizona State?
CREATE TABLE table_22815265_1 (opponents INTEGER, opponent VARCHAR)
SELECT nhl_team FROM table_1965650_8 WHERE player = "Jim Koleff"
What NHL team did jim koleff play on?
CREATE TABLE table_1965650_8 (nhl_team VARCHAR, player VARCHAR)
WITH awarded AS (SELECT COUNT(*) AS num, Name, Class FROM Badges GROUP BY Name, Class HAVING COUNT(*) = 1) SELECT b.Name, b.Class, u.DisplayName FROM Badges AS b JOIN awarded AS a ON a.Name = b.Name AND a.Class = b.Class JOIN Users AS u ON u.Id = b.UserId
Single awarded badges and users.
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 ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description 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 PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) 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 SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) 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 PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) 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 PostTypes ( Id number, Name text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskTypes ( 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 CloseReasonTypes ( 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 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 )
SELECT COUNT(record) FROM table_22815265_1 WHERE opponent = "Utah"
How many records show Utah as the opponent?
CREATE TABLE table_22815265_1 (record VARCHAR, opponent VARCHAR)
SELECT COUNT(division) FROM table_1969634_1 WHERE nickname = "Skyhawks"
How many teams have skyhawks as a nickname?
CREATE TABLE table_1969634_1 (division VARCHAR, nickname VARCHAR)
SELECT AVG("Number of seasons in top division") FROM table_5658 WHERE "Number of seasons in Prva HNL" = '17'
Name the average number of seasons for Prva HNL of 17
CREATE TABLE table_5658 ( "Club" text, "Position in 2012\u201313" text, "First season in top division" text, "Number of seasons in top division" real, "Number of seasons in Prva HNL" real, "First season of current spell in top division" text, "Top division titles" text, "Last top division title" text )
SELECT opponents FROM table_22815265_1 WHERE cowboys_points = 10
How many opponents are there when cowboy points were 10?
CREATE TABLE table_22815265_1 (opponents VARCHAR, cowboys_points VARCHAR)
SELECT enrollment FROM table_1969634_1 WHERE location = "Garden City, New York"
What is the total enrollment for the school in garden city, new york?
CREATE TABLE table_1969634_1 (enrollment VARCHAR, location VARCHAR)
SELECT "Contestant" FROM table_1930 WHERE "Hometown" = 'Santiago del Estero'
When santiago del estero is the hometown who is the contestant?
CREATE TABLE table_1930 ( "Country" text, "Contestant" text, "Age" real, "Height (cm)" real, "Height (ft)" text, "Hometown" text )
SELECT COUNT(record) FROM table_22815265_1 WHERE opponents = 9
How many records were there when opponents were 9?
CREATE TABLE table_22815265_1 (record VARCHAR, opponents VARCHAR)
SELECT COUNT(institution) FROM table_1969634_1 WHERE nickname = "Greyhounds"
How many schools with greyhounds as their nickname?
CREATE TABLE table_1969634_1 (institution VARCHAR, nickname VARCHAR)
SELECT "Rally Base" FROM table_26005 WHERE "Rally Name" = 'Rallye de France Alsace'
Name the rally base for rallye de france alsace
CREATE TABLE table_26005 ( "Round" real, "Finishing Date" text, "Rally Name" text, "Rally Base" text, "Surface" text, "Support Category" text )
SELECT COUNT(record) FROM table_22815259_1 WHERE cowboys_points = 12
Name the number of record for 12 cowboys points
CREATE TABLE table_22815259_1 (record VARCHAR, cowboys_points VARCHAR)
SELECT COUNT(enrollment) FROM table_1969634_1 WHERE institution = "Southern New Hampshire University"
How many schools named southern new hampshire university?
CREATE TABLE table_1969634_1 (enrollment VARCHAR, institution VARCHAR)
SELECT T1.famous_title FROM artist AS T1 JOIN volume AS T2 ON T1.artist_id = T2.artist_id WHERE T2.weeks_on_top > 2 INTERSECT SELECT T1.famous_title FROM artist AS T1 JOIN volume AS T2 ON T1.artist_id = T2.artist_id WHERE T2.weeks_on_top < 2
What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top?
CREATE TABLE music_festival ( id number, music_festival text, date_of_ceremony text, category text, volume number, result text ) CREATE TABLE artist ( artist_id number, artist text, age number, famous_title text, famous_release_date text ) CREATE TABLE volume ( volume_id number, volume_issue text, issue_date text, weeks_on_top number, song text, artist_id number )
SELECT MAX(game) FROM table_22815259_1 WHERE record = "4-0"
Name the most game for record 4-0
CREATE TABLE table_22815259_1 (game INTEGER, record VARCHAR)
SELECT results FROM table_19722436_2 WHERE gt1_winning_team = "No.55 IPB Spartak Racing"
When no.55 ipb spartak racing is the g1 winning team what are the results?
CREATE TABLE table_19722436_2 (results VARCHAR, gt1_winning_team VARCHAR)
SELECT "Campanius (ca. 1645)" FROM table_52527 WHERE "Unami Delaware" = 'palé·naxk'
What is the Campanius term for an Unami Delaware term of pal naxk?
CREATE TABLE table_52527 ( "Munsee Delaware" text, "Unami Delaware" text, "De Laet (1633)" text, "Campanius (ca. 1645)" text, "Interpreter (1684?)" text, "Thomas (1698)" text )
SELECT COUNT(result) FROM table_22815259_1 WHERE cowboys_points = 23
Name the result for cowboys points being 23
CREATE TABLE table_22815259_1 (result VARCHAR, cowboys_points VARCHAR)
SELECT COUNT(lmp1_winning_team) FROM table_19722436_2 WHERE gt1_winning_team = "Peter Kox Roman Rusinov"
When peter kox roman rusinov is the gt1 of the winning team how many lmp1 winning teams are there?
CREATE TABLE table_19722436_2 (lmp1_winning_team VARCHAR, gt1_winning_team VARCHAR)
SELECT country FROM table_name_59 WHERE to_par = "+1"
What is the Country of the Player with a To par of +1?
CREATE TABLE table_name_59 ( country VARCHAR, to_par VARCHAR )
SELECT record FROM table_22815259_1 WHERE opponent = "Arizona"
Name the record for arizona
CREATE TABLE table_22815259_1 (record VARCHAR, opponent VARCHAR)
SELECT COUNT(rnd) FROM table_19722436_2 WHERE gt1_winning_team = "Julien Jousse Patrice Goueslard Yann Clairay"
When julien jousse patrice goueslard yann clairay is teh gt1 of the winning team how many measurements of rnd. are there?
CREATE TABLE table_19722436_2 (rnd VARCHAR, gt1_winning_team VARCHAR)
SELECT "Sub-Parish (Sokn)" FROM table_62467 WHERE "Year Built" = '1957' AND "Location of the Church" = 'stavang'
What is the Sub-Parish (Sokn) that was built in 1957 in the location of Stavang?
CREATE TABLE table_62467 ( "Parish (Prestegjeld)" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" text, "Location of the Church" text )
SELECT COUNT(unemployment_rate) FROM table_22815568_12 WHERE population = 34024
Name the unemployment rate for 34024
CREATE TABLE table_22815568_12 (unemployment_rate VARCHAR, population VARCHAR)
SELECT COUNT(nickname) FROM table_1973729_1 WHERE location = "Milton, Massachusetts"
How many nicknames were associated with Milton, Massachusetts?
CREATE TABLE table_1973729_1 (nickname VARCHAR, location VARCHAR)
SELECT team FROM table_name_28 WHERE car_no = "11"
What team operates car 11?
CREATE TABLE table_name_28 ( team VARCHAR, car_no VARCHAR )
SELECT COUNT(population) FROM table_22815568_12 WHERE county = "Craig"
Name the total number of population for craig
CREATE TABLE table_22815568_12 (population VARCHAR, county VARCHAR)
SELECT location FROM table_1973729_1 WHERE institution = "Eastern Nazarene College"
Where is the Eastern Nazarene College located?
CREATE TABLE table_1973729_1 (location VARCHAR, institution VARCHAR)
SELECT "Opponent" FROM table_68244 WHERE "Record" = '17-25'
Which of the opponents has a record of 17-25?
CREATE TABLE table_68244 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
SELECT unemployment_rate FROM table_22815568_12 WHERE county = "Botetourt"
Name the unemployment rate for botetourt
CREATE TABLE table_22815568_12 (unemployment_rate VARCHAR, county VARCHAR)
SELECT COUNT(joined) FROM table_1973729_1 WHERE nickname = "Nor'easters"
How many years are listed under joined for the Nor'easters?
CREATE TABLE table_1973729_1 (joined VARCHAR, nickname VARCHAR)
SELECT "Player" FROM table_33417 WHERE "Overall" < '374' AND "School/Club Team" = 'stephen f. austin'
Which player was drafted higher than 374 and went to the school Stephen F. Austin?
CREATE TABLE table_33417 ( "Round" real, "Overall" real, "Player" text, "Position" text, "School/Club Team" text )
SELECT status FROM table_22815568_12 WHERE unemployment_rate = "6.7%"
Name the status for unemployment rate being 6.7%
CREATE TABLE table_22815568_12 (status VARCHAR, unemployment_rate VARCHAR)
SELECT location FROM table_1973729_1 WHERE enrollment = 2686
What location contains a school that has an enrollment of 2686?
CREATE TABLE table_1973729_1 (location VARCHAR, enrollment VARCHAR)
SELECT T2.Name, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
Return a bar chart on what are the names and average prices of products for manufacturers whose products cost on average 150 or more?, display in descending by the Name.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT status FROM table_22815568_1 WHERE poverty_rate = "14.7%"
What is the status of the county that has a 14.7% poverty rate?
CREATE TABLE table_22815568_1 (status VARCHAR, poverty_rate VARCHAR)
SELECT MIN(joined) FROM table_1973729_1 WHERE nickname = "Lions"
In what year did the Lions join?
CREATE TABLE table_1973729_1 (joined INTEGER, nickname VARCHAR)
SELECT "State" FROM table_48263 WHERE "From" = '830 bc'
What is State, when From is '830 BC'?
CREATE TABLE table_48263 ( "State" text, "Type" text, "Name" text, "Title" text, "Royal house" text, "From" text )
SELECT poverty_rate FROM table_22815568_1 WHERE market_income_per_capita = "$16,420"
What is the poverty rate in the county that has a market income per capita of $16,420?
CREATE TABLE table_22815568_1 (poverty_rate VARCHAR, market_income_per_capita VARCHAR)
SELECT current_conference FROM table_1973729_2 WHERE nickname = "Chargers"
Which conference has the nickname Chargers?
CREATE TABLE table_1973729_2 (current_conference VARCHAR, nickname VARCHAR)
SELECT "Province" FROM table_29647 WHERE "Electorate" = 'Collingwood'
What was the province if the electorate was Collingwood?
CREATE TABLE table_29647 ( "Member" text, "Electorate" text, "Province" text, "MPs term" text, "Election date" text )
SELECT MIN(population) FROM table_22815568_1 WHERE market_income_per_capita = "$24,383"
What is the lowest population in a county with market income per capita of $24,383?
CREATE TABLE table_22815568_1 (population INTEGER, market_income_per_capita VARCHAR)
SELECT current_conference FROM table_1973729_2 WHERE nickname = "Lions"
Which conference has the nickname Lions?
CREATE TABLE table_1973729_2 (current_conference VARCHAR, nickname VARCHAR)
SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY Headquarters
How many companies in each headquarter? Plot a bar chart, and I want to sort from low to high by the x-axis.
CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value real ) CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) CREATE TABLE gas_station ( Station_ID int, Open_Year int, Location text, Manager_Name text, Vice_Manager_Name text, Representative_Name text )
SELECT poverty_rate FROM table_22815568_1 WHERE market_income_per_capita = "$20,518"
What is the povery rate of the county with market income per capita of $20,518?
CREATE TABLE table_22815568_1 (poverty_rate VARCHAR, market_income_per_capita VARCHAR)