answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT name FROM table_name_9 WHERE year > 2001 AND length = "52 x 20 mins"
Which Name has a Year larger than 2001, and a Length of 52 x 20 mins?
CREATE TABLE table_name_9 ( name VARCHAR, year VARCHAR, length VARCHAR )
SELECT date FROM table_name_13 WHERE course = "moena to aprica"
What date was moena to aprica the course?
CREATE TABLE table_name_13 (date VARCHAR, course VARCHAR)
SELECT market_income_per_capita FROM table_22815568_6 WHERE poverty_rate = "12.9%"
If the poverty rate is 12.9%, what is the market income per capita?
CREATE TABLE table_22815568_6 (market_income_per_capita VARCHAR, poverty_rate VARCHAR)
SELECT position FROM table_25017530_6 WHERE player = "Michael Warner"
Name the position for michael warner
CREATE TABLE table_25017530_6 ( position VARCHAR, player VARCHAR )
SELECT winner FROM table_name_35 WHERE type = "plain stage" AND course = "nola to sora"
What is the name of the winner with a type of plain stage and a Course of nola to sora?
CREATE TABLE table_name_35 (winner VARCHAR, type VARCHAR, course VARCHAR)
SELECT viewers__millions_ FROM table_22822468_2 WHERE rating = "2.1"
Name the viewers for 2.1 rating
CREATE TABLE table_22822468_2 (viewers__millions_ VARCHAR, rating VARCHAR)
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-157712')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'po fluid' ORDER BY intakeoutput.intakeoutputtime LIMIT 1
what was patient 022-157712's first time of taking po fluid?
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 lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime 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 treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime 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 )
SELECT text_symbol FROM table_name_68 WHERE border = "red" AND type_of_sign = "warning"
Which sign has a red border and a warning sign?
CREATE TABLE table_name_68 (text_symbol VARCHAR, border VARCHAR, type_of_sign VARCHAR)
SELECT MAX(share) FROM table_22822468_2 WHERE viewers__millions_ = "2.76"
Name the most share for 2.76 million viewers
CREATE TABLE table_22822468_2 (share INTEGER, viewers__millions_ VARCHAR)
SELECT MAX(officers_o_s) FROM table_23508196_2 WHERE total_usaaf = 2373882
How many officers o/s were there on the day when the number of USAAF was 2373882?
CREATE TABLE table_23508196_2 ( officers_o_s INTEGER, total_usaaf VARCHAR )
SELECT border FROM table_name_86 WHERE background_colour = "yellow" AND shape = "triangular"
Which sign had a yellow background and a triangular shape?
CREATE TABLE table_name_86 (border VARCHAR, background_colour VARCHAR, shape VARCHAR)
SELECT viewers__millions_ FROM table_22822468_2 WHERE rating / SHARE(18 AS –49) = 1.2 / 4
Name the viewers for 1.2/4 rating
CREATE TABLE table_22822468_2 (viewers__millions_ VARCHAR, rating VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "6" AND lab."CATEGORY" = "Chemistry"
what is the number of patients whose hospital stay is above 6 days and with lab test category chemistry?
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 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 text_symbol FROM table_name_42 WHERE border = "red"
Which sign has a red border?
CREATE TABLE table_name_42 (text_symbol VARCHAR, border VARCHAR)
SELECT rating / SHARE(18 AS –49) FROM table_22822468_2 WHERE viewers__millions_ = "3.79"
Name the rating for 3.79 viewers
CREATE TABLE table_22822468_2 (rating VARCHAR, viewers__millions_ VARCHAR)
SELECT guardian_mātṛkā FROM table_100518_1 WHERE consort = "Svāhā"
What is the guardian m t k for the guardian whose consort is Sv h ?
CREATE TABLE table_100518_1 ( guardian_mātṛkā VARCHAR, consort VARCHAR )
SELECT background_colour FROM table_name_43 WHERE type_of_sign = "mandatory instructions"
Which color is the background of the mandatory instructions?
CREATE TABLE table_name_43 (background_colour VARCHAR, type_of_sign VARCHAR)
SELECT MIN(europa_league) FROM table
Name the least europa league
CREATE TABLE table (europa_league INTEGER)
SELECT AVG(T2.weeks_on_top) FROM artist AS T1 JOIN volume AS T2 ON T1.artist_id = T2.artist_id WHERE T1.age <= 25
Return the average number of weeks on top for volumes by artists that are at most 25 years old.
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 background_colour FROM table_name_25 WHERE border = "white" AND type_of_sign = "information"
What is the color of the background of the white border and sign of information?
CREATE TABLE table_name_25 (background_colour VARCHAR, border VARCHAR, type_of_sign VARCHAR)
SELECT COUNT(high_rebounds) FROM table_22822559_4 WHERE date = "November 27"
What was the total number of rebounds on november 27?
CREATE TABLE table_22822559_4 (high_rebounds VARCHAR, date VARCHAR)
SELECT area_km_2 FROM table_name_49 WHERE census_ranking = "2,290 of 5,008"
what is the area when the census ranking is 2,290 of 5,008?
CREATE TABLE table_name_49 ( area_km_2 VARCHAR, census_ranking VARCHAR )
SELECT AVG(total) FROM table_name_56 WHERE nation = "italy" AND bronze > 1
What is the average total of Italy and has a bronze larger than 1?
CREATE TABLE table_name_56 (total INTEGER, nation VARCHAR, bronze VARCHAR)
SELECT date FROM table_22822559_4 WHERE team = "@ Toronto"
On what date did the Pistons play @ toronto?
CREATE TABLE table_22822559_4 (date VARCHAR, team VARCHAR)
SELECT power_output_(kw) FROM table_name_38 WHERE total_production = 100
Tell me the power output for total production of 100
CREATE TABLE table_name_38 ( power_output_(kw) VARCHAR, total_production VARCHAR )
SELECT SUM(gold) FROM table_name_8 WHERE nation = "russia" AND rank > 1
What amount of Gold does Russia have and have a rank larger than 1?
CREATE TABLE table_name_8 (gold INTEGER, nation VARCHAR, rank VARCHAR)
SELECT COUNT(location_attendance) FROM table_22822559_4 WHERE game = 7
List the location and number of fans in attendance for game 7/
CREATE TABLE table_22822559_4 (location_attendance VARCHAR, game VARCHAR)
SELECT "Notes" FROM table_48005 WHERE "Year" = '2008' AND "Position" = '19th'
What is the note result when the runner finished 19th in 2008?
CREATE TABLE table_48005 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text, "Notes" text )
SELECT SUM(rank) FROM table_name_83 WHERE total = 1 AND silver < 0
What is the sum of the ranks with a total of 1 and silver less than 0.
CREATE TABLE table_name_83 (rank INTEGER, total VARCHAR, silver VARCHAR)
SELECT steals FROM table_22824302_3 WHERE games_played = 31
How many interceptions for the team who played 31 games?
CREATE TABLE table_22824302_3 (steals VARCHAR, games_played VARCHAR)
SELECT "1st pers. pl" FROM table_27801 WHERE "2nd pers. sing." = 'тонэ'
Name the 1st person pl for
CREATE TABLE table_27801 ( "Case" text, "1st pers. sing." text, "2nd pers. sing." text, "3rd pers. sing." text, "1st pers. pl" text, "2nd pers. pl." text, "3rd pers pl." text )
SELECT player FROM table_name_69 WHERE position = "linebacker" AND pick > 28
Which Player is linebacker and has a pick larger than 28?
CREATE TABLE table_name_69 (player VARCHAR, position VARCHAR, pick VARCHAR)
SELECT MIN(steals) FROM table_22824302_3 WHERE rebounds = 121
How many steals for the player who had 121 rebounds?
CREATE TABLE table_22824302_3 (steals INTEGER, rebounds VARCHAR)
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-10593')) AND STRFTIME('%y', medication.drugstarttime) >= '2105'
calculate the number of drugs since 2105 patient 033-10593 has been prescribed.
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 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 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 ) 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 allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) 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 )
SELECT MIN(round) FROM table_name_99 WHERE player = "melvin johnson"
What was the lowest round that Melvin Johnson played?
CREATE TABLE table_name_99 (round INTEGER, player VARCHAR)
SELECT date FROM table_22822559_8 WHERE record = "23-47"
What date was the Piston's record at 23-47?
CREATE TABLE table_22822559_8 (date VARCHAR, record VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "SIGMOID DIVERTICULITIS, COLOVESTICAL FISTULA/SDA" AND demographic.dod_year <= "2133.0"
How many patients who died in or before the year 2133 had sigmoid diverticulitis, colovestical fistula/sda as their primary disease?
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 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 )
SELECT runner_up FROM table_name_96 WHERE semi_finalist__number1 = "south florida"
Who was the runner-up at the South Florida Semi-Finalist #1?
CREATE TABLE table_name_96 (runner_up VARCHAR, semi_finalist__number1 VARCHAR)
SELECT high_rebounds FROM table_22822559_8 WHERE record = "23-47"
Who had the highest rebounds during the game with a record of 23-47?
CREATE TABLE table_22822559_8 (high_rebounds VARCHAR, record VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "20" AND lab.label = "MCHC"
What is the number of patients less than 20 years of age who had a mchc lab test done?
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 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 ) 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 champion FROM table_name_46 WHERE location = "snellville, ga" AND year = "2006"
Who was the Champion in Snellville, GA in 2006?
CREATE TABLE table_name_46 (champion VARCHAR, location VARCHAR, year VARCHAR)
SELECT COUNT(rebounds) FROM table_22824199_1 WHERE points = 147
How many rebound did the person who scored 147 points have?
CREATE TABLE table_22824199_1 (rebounds VARCHAR, points VARCHAR)
SELECT "Distance from Jaffa" FROM table_35300 WHERE "Name/Location" = 'jerusalem'
What is the distance from Jaffa of Jerusalem station?
CREATE TABLE table_35300 ( "Name/Location" text, "Other (later) names" text, "Operation" text, "Distance from Jaffa" text, "Elevation" text )
SELECT champion FROM table_name_53 WHERE runner_up = "elon"
Who won when Elon was the runner-up?
CREATE TABLE table_name_53 (champion VARCHAR, runner_up VARCHAR)
SELECT MIN(three_pointers) FROM table_22824199_1 WHERE free_throws = 50
Of the players with 50 free throws, what is the lowest number of three pointers?
CREATE TABLE table_22824199_1 (three_pointers INTEGER, free_throws VARCHAR)
SELECT "Winnings" FROM table_20693 WHERE "Avg. Finish" = '11.1'
What are the winnings for the season where the average finish is 11.1?
CREATE TABLE table_20693 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text )
SELECT year FROM table_name_9 WHERE score = "8-5"
What year saw a score of 8-5?
CREATE TABLE table_name_9 (year VARCHAR, score VARCHAR)
SELECT player FROM table_22824199_1 WHERE rebounds = 156
Who are all the players with 156 rebounds?
CREATE TABLE table_22824199_1 (player VARCHAR, rebounds VARCHAR)
SELECT "Rank" FROM table_47140 WHERE "Run 2" = '1:20.8' AND "Run 4" = '1:23.0'
What was the rank of the team with a run 2 of 1:20.8 and a run 4 of 1:23.0?
CREATE TABLE table_47140 ( "Rank" text, "Team" text, "Run 1" text, "Run 2" text, "Run 3" text, "Run 4" text, "Final" text )
SELECT semi_finalist__number2 FROM table_name_59 WHERE year = "2007"
Who was the Semi-Finalist #2 in 2007?
CREATE TABLE table_name_59 (semi_finalist__number2 VARCHAR, year VARCHAR)
SELECT MAX(games_played) FROM table_22824199_1 WHERE three_pointers = 5
Of the players who scored 5 three pointers, what is the highest number of games played?
CREATE TABLE table_22824199_1 (games_played INTEGER, three_pointers VARCHAR)
SELECT MIN("Grid") FROM table_78428 WHERE "Constructor" = 'matra'
What is the lowest grid with matra as constructor?
CREATE TABLE table_78428 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT semi_finalist__number2 FROM table_name_26 WHERE year = "2001"
Who was the Semi-Finalist #2 in 2001?
CREATE TABLE table_name_26 (semi_finalist__number2 VARCHAR, year VARCHAR)
SELECT no FROM table_22824297_1 WHERE hometown = "Canton, Illinois"
What is every number for the hometown of Canton, Illinois?
CREATE TABLE table_22824297_1 (no VARCHAR, hometown VARCHAR)
SELECT "Result" FROM table_49599 WHERE "Opponent" = 'greensboro prowlers' AND "Date" = 'april 6, 2002'
What was the result of the april 6, 2002 game against the greensboro prowlers?
CREATE TABLE table_49599 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game site" text )
SELECT tournament FROM table_name_70 WHERE location = "arizona"
What tournament is in Arizona?
CREATE TABLE table_name_70 (tournament VARCHAR, location VARCHAR)
SELECT player FROM table_22824297_1 WHERE height = "6-5"
Who is every player with a height of 6-5?
CREATE TABLE table_22824297_1 (player VARCHAR, height VARCHAR)
SELECT "Stadium" FROM table_24370 WHERE "Date/Year" = 'Fri 06/25/82'
Which stadium has the date/year of Fri 06/25/82?
CREATE TABLE table_24370 ( "Type of Record" text, "Attendance" real, "Date/Year" text, "Stadium" text, "Result/Games" text )
SELECT away_team FROM table_name_60 WHERE crowd > 21 OFFSET 000
Which away team had a crowd bigger than 21,000?
CREATE TABLE table_name_60 (away_team VARCHAR, crowd INTEGER)
SELECT player FROM table_22824297_1 WHERE hometown = "Carbondale, Illinois"
Who are all players from hometown of Carbondale, Illinois?
CREATE TABLE table_22824297_1 (player VARCHAR, hometown VARCHAR)
SELECT q.Id AS "post_link" FROM Posts AS a INNER JOIN Posts AS q ON a.ParentId = q.Id WHERE a.OwnerUserId = '##Answerer##' AND q.OwnerUserId = '##Asker##'
Question asked by X which were answered by Y.
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 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 PostTags ( PostId number, TagId number ) 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 ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskTypes ( 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 Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) 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 ReviewTaskStates ( 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 TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense 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 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 SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange 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 )
SELECT AVG(rank) FROM table_name_88 WHERE points < "166".96 AND places = "166"
What is the rank for points less than 166.96, and a Places of 166?
CREATE TABLE table_name_88 (rank INTEGER, points VARCHAR, places VARCHAR)
SELECT class FROM table_22824297_1 WHERE position = "Guard" AND player = "Tal Brody"
What is every class with a position of guard and Tal Brody as the player?
CREATE TABLE table_22824297_1 (class VARCHAR, position VARCHAR, player VARCHAR)
SELECT "Record" FROM table_58575 WHERE "Location Attendance" = 'air canada centre 19,800'
What was the season record when the location attendance was Air Canada Centre 19,800?
CREATE TABLE table_58575 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT(rank) FROM table_name_21 WHERE points > 120.44 AND nation = "east germany" AND sp + fs = 3
What is the rank for more than 120.44 points in East Germany and a SP+FS of 3?
CREATE TABLE table_name_21 (rank VARCHAR, points VARCHAR, nation VARCHAR, sp VARCHAR, fs VARCHAR)
SELECT COUNT(no) FROM table_22824297_1 WHERE hometown = "Canton, Illinois"
How many values for number occur with the hometown of Canton, Illinois?
CREATE TABLE table_22824297_1 (no VARCHAR, hometown VARCHAR)
SELECT date FROM table_name_28 WHERE high_rebounds = "amar'e stoudemire (13)"
What is Date, when High Rebounds is 'Amar'e Stoudemire (13)'?
CREATE TABLE table_name_28 ( date VARCHAR, high_rebounds VARCHAR )
SELECT COUNT(rank) FROM table_name_94 WHERE places = "233" AND sp + fs < 27
What is the rank when 233 shows for places and SP+FS smaller than 27?
CREATE TABLE table_name_94 (rank VARCHAR, places VARCHAR, sp VARCHAR, fs VARCHAR)
SELECT class FROM table_22824312_1 WHERE player = "Ren Alde"
What class was ren alde?
CREATE TABLE table_22824312_1 (class VARCHAR, player VARCHAR)
SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM class AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'
Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.
CREATE TABLE enroll ( class_code text, stu_num number, enroll_grade text ) CREATE TABLE student ( stu_num number, stu_lname text, stu_fname text, stu_init text, stu_dob time, stu_hrs number, stu_class text, stu_gpa number, stu_transfer number, dept_code text, stu_phone text, prof_num number ) CREATE TABLE course ( crs_code text, dept_code text, crs_description text, crs_credit number ) CREATE TABLE class ( class_code text, crs_code text, class_section text, class_time text, class_room text, prof_num number ) CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE employee ( emp_num number, emp_lname text, emp_fname text, emp_initial text, emp_jobcode text, emp_hiredate time, emp_dob time ) CREATE TABLE professor ( emp_num number, dept_code text, prof_office text, prof_extension text, prof_high_degree text )
SELECT AVG(sp) + fs FROM table_name_14 WHERE name = "denise biellmann" AND rank > 5
What is the average SP+FS for Denise Biellmann, and a Rank larger than 5?
CREATE TABLE table_name_14 (fs VARCHAR, sp INTEGER, name VARCHAR, rank VARCHAR)
SELECT player FROM table_22824312_1 WHERE weight = 170
Who are the player's who weighed 170?
CREATE TABLE table_22824312_1 (player VARCHAR, weight VARCHAR)
SELECT country FROM table_name_94 WHERE player = "david toms"
what country hosted david toms
CREATE TABLE table_name_94 ( country VARCHAR, player VARCHAR )
SELECT SUM(points) FROM table_name_84 WHERE nation = "east germany" AND places = "88"
What is the number of points for east germany, and a Places of 88?
CREATE TABLE table_name_84 (points INTEGER, nation VARCHAR, places VARCHAR)
SELECT hometown FROM table_22824312_1 WHERE player = "Jim Dutcher"
What is jim dutcher's hometown?
CREATE TABLE table_22824312_1 (hometown VARCHAR, player VARCHAR)
SELECT region FROM table_25042332_33 WHERE life_expectancy_at_birth__2001_2002_ = "77.9"
Which region had a life expectancy at birth of 77.9 from 2001-2002?
CREATE TABLE table_25042332_33 ( region VARCHAR, life_expectancy_at_birth__2001_2002_ VARCHAR )
SELECT years FROM table_name_82 WHERE engine = "5.7l hemi v8"
what is the years for engin 5.7l hemi v8?
CREATE TABLE table_name_82 (years VARCHAR, engine VARCHAR)
SELECT COUNT(player) FROM table_22824319_3 WHERE points = 51
Name the total number of player for 51 points
CREATE TABLE table_22824319_3 (player VARCHAR, points VARCHAR)
SELECT Party, COUNT(*) FROM people GROUP BY Party
Show different parties of people along with the number of people in each party with a bar chart.
CREATE TABLE debate_people ( Debate_ID int, Affirmative int, Negative int, If_Affirmative_Win bool ) CREATE TABLE people ( People_ID int, District text, Name text, Party text, Age int ) CREATE TABLE debate ( Debate_ID int, Date text, Venue text, Num_of_Audience int )
SELECT years FROM table_name_51 WHERE notes = "laredo, limited, overland" AND engine = "5.7l hemi v8"
what is the years when the notes is laredo, limited, overland and the engine is 5.7l hemi v8?
CREATE TABLE table_name_51 (years VARCHAR, notes VARCHAR, engine VARCHAR)
SELECT MAX(rebounds) FROM table_22824319_3 WHERE player = "Larry Smith"
Name the most rebounds for larry smith
CREATE TABLE table_22824319_3 (rebounds INTEGER, player VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dob_year < "2078"
how many patients of black/african american ethnicity are born before 2078?
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 ) 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 )
SELECT torque FROM table_name_69 WHERE notes = "laredo, limited, overland" AND engine = "5.7l hemi v8"
what is the torque when the notes are laredo, limited, overland and the engine is 5.7l hemi v8?
CREATE TABLE table_name_69 (torque VARCHAR, notes VARCHAR, engine VARCHAR)
SELECT steals FROM table_22824319_3 WHERE blocks = 5
Name the steals for 5 blocks
CREATE TABLE table_22824319_3 (steals VARCHAR, blocks VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.dob_year < "2138"
how many patients are admitted in location transfer within this facility and are born before 2138?
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 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 )
SELECT driver FROM table_name_21 WHERE constructor = "ferrari" AND laps = 57
Who drove the ferrari that went 57 laps?
CREATE TABLE table_name_21 (driver VARCHAR, constructor VARCHAR, laps VARCHAR)
SELECT MIN(points) FROM table_22824319_3
Name the least points
CREATE TABLE table_22824319_3 (points INTEGER)
SELECT wins FROM table_name_92 WHERE third = "1" AND points < 572 AND races < 16
What is the number of wins when the number of third was 1, points were less than 572 and had less than 16 races?
CREATE TABLE table_name_92 ( wins VARCHAR, races VARCHAR, third VARCHAR, points VARCHAR )
SELECT SUM(place) FROM table_name_7 WHERE name = "r. wenzel" AND until > 1934
What place did R. Wenzel, who was active after 1934, have?
CREATE TABLE table_name_7 (place INTEGER, name VARCHAR, until VARCHAR)
SELECT h_ci__ka_m_ FROM table_2282444_1 WHERE b_r__t_ = "0.6–1.4"
When 0.6–1.4 is the b r (t) what is the h ci (ka/m)?
CREATE TABLE table_2282444_1 (h_ci__ka_m_ VARCHAR, b_r__t_ VARCHAR)
SELECT "Away team" FROM table_74792 WHERE "Venue" = 'brunswick street oval'
What away team played at Brunswick Street Oval?
CREATE TABLE table_74792 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT time FROM table_name_75 WHERE round = "n/a" AND opponent = "mikhail ilyukhin"
What's the time for a round of n/a when the opponent is mikhail ilyukhin?
CREATE TABLE table_name_75 (time VARCHAR, round VARCHAR, opponent VARCHAR)
SELECT COUNT(t_c__) AS °c_ FROM table_2282444_1 WHERE magnet = "Nd 2 Fe 14 B (bonded)"
When nd 2 fe 14 b (bonded) is the magnet how many measurements of tc (°c)?
CREATE TABLE table_2282444_1 (t_c__ VARCHAR, magnet VARCHAR)
SELECT "Director" FROM table_19804 WHERE "#" = '13'
Who is the director of the episode at entry number 13?
CREATE TABLE table_19804 ( "#" real, "Episode" text, "Writer" text, "Director" text, "Original air date" text, "Viewing figure" text )
SELECT pole_position FROM table_name_54 WHERE grand_prix = "portuguese grand prix"
What is the pole position of the Portuguese Grand Prix?
CREATE TABLE table_name_54 (pole_position VARCHAR, grand_prix VARCHAR)
SELECT h_ci__ka_m_ FROM table_2282444_1 WHERE t_c__°c_ = "720"
When 720 is the t c (°c) what is the h ci (ka/m)?
CREATE TABLE table_2282444_1 (h_ci__ka_m_ VARCHAR, t_c__°c_ VARCHAR)
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Journalistic Performance%' OR name LIKE '%Journalistic Performance%') AND credits = 7
Get all the 7 -credit Journalistic Performance courses .
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text 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 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 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 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 instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category 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 course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE 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 )
SELECT pole_position FROM table_name_93 WHERE round = 1
What is the pole position of the grand prix with 1 round?
CREATE TABLE table_name_93 (pole_position VARCHAR, round VARCHAR)
SELECT sec_wins FROM table_22825679_1 WHERE percentage = ".357" AND home_record = "4-3"
Name the sec wins for .357 percentage and 4-3 home record
CREATE TABLE table_22825679_1 (sec_wins VARCHAR, percentage VARCHAR, home_record VARCHAR)
SELECT "Date" FROM table_56399 WHERE "Away team" = 'south melbourne'
If the Away team was south melbourne what Date did they play?
CREATE TABLE table_56399 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )