answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT gender, AVG(age) FROM Person GROUP BY gender ORDER BY AVG(age)
Return a bar chart on what is the average age for each gender?, and rank by the y-axis from low to high.
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER )
SELECT title FROM table_23513241_5 WHERE series_episode = 38
List the title of series episode 38.
CREATE TABLE table_23513241_5 (title VARCHAR, series_episode VARCHAR)
SELECT no_in_series FROM table_23528223_2 WHERE directed_by = "Skipp Sudduth"
What's the series number of the episode directed by Skipp Sudduth?
CREATE TABLE table_23528223_2 (no_in_series VARCHAR, directed_by VARCHAR)
SELECT COUNT("Season") FROM table_43741 WHERE "Downhill" = '35' AND "Overall" > '21'
What season had a downhill of 35 and overall greater than 21?
CREATE TABLE table_43741 ( "Season" real, "Overall" real, "Slalom" text, "Giant Slalom" real, "Super G" text, "Downhill" text, "Combined" text )
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 written_by FROM table_23528223_2 WHERE us_viewers__millions_ = "10.64"
Who wrote the episode seen by 10.64 million people in the US?
CREATE TABLE table_23528223_2 (written_by VARCHAR, us_viewers__millions_ VARCHAR)
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%bangladesh%' OR UPPER(Location) LIKE '%bd' ORDER BY Reputation DESC LIMIT 100
Top 100 users from Bangladesh.
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) 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 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 CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId 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 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 FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount 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 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 TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) 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 ReviewTaskTypes ( Id number, Name text, Description text )
SELECT year FROM table_23548160_1 WHERE driver = "Randy Lewis"
What year did Randy Lewis drive?
CREATE TABLE table_23548160_1 (year VARCHAR, driver VARCHAR)
SELECT COUNT(scores) FROM table_23575917_2 WHERE davids_team = "David Baddiel and Maureen Lipman"
Name the scores for david baddiel and maureen lipman
CREATE TABLE table_23575917_2 (scores VARCHAR, davids_team VARCHAR)
SELECT "Incorporated in" FROM table_67422 WHERE "Principal activities" = 'travel agency'
Name the incorporated for principal activites of travel agency
CREATE TABLE table_67422 ( "Company" text, "Type" text, "Principal activities" text, "Incorporated in" text, "Group's Equity Shareholding (10 March 2010)" text )
SELECT constructor FROM table_23548160_1 WHERE year = 1975
What was the constructor in 1975?
CREATE TABLE table_23548160_1 (constructor VARCHAR, year VARCHAR)
SELECT scores FROM table_23575917_2 WHERE lees_team = "Michael Buerk and Russell Howard"
Name the scores for michael buerk and russell howard
CREATE TABLE table_23575917_2 (scores VARCHAR, lees_team VARCHAR)
SELECT COUNT(no_in_series) FROM table_18734298_1 WHERE directed_by = "Rob Renzetti"
How many series were directed by Rob Renzetti?
CREATE TABLE table_18734298_1 ( no_in_series VARCHAR, directed_by VARCHAR )
SELECT weight FROM table WHERE market_name = "Xperia U"
If the market name is Xperia U, what is the weight?
CREATE TABLE table (weight VARCHAR, market_name VARCHAR)
SELECT davids_team FROM table_23575917_2 WHERE first_broadcast = "8 August 2008"
Name the davids team for 8 august 2008
CREATE TABLE table_23575917_2 (davids_team VARCHAR, first_broadcast VARCHAR)
SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1
What is the title of the film that has the highest high market estimation.
CREATE TABLE film ( Film_ID VARCHAR ) CREATE TABLE film_market_estimation ( Film_ID VARCHAR )
SELECT release_date FROM table WHERE code_name = "Aoba"
What is the release date if the code name is Aoba?
CREATE TABLE table (release_date VARCHAR, code_name VARCHAR)
SELECT episode FROM table_23575917_4 WHERE first_broadcast = "3 September 2010"
What is the episode number that was first broadcast on 3 September 2010?
CREATE TABLE table_23575917_4 (episode VARCHAR, first_broadcast VARCHAR)
SELECT "Team" FROM table_38607 WHERE "CONMEBOL 1995" = 'round 1'
Which Team has a round 1 CONMEBOL 1995?
CREATE TABLE table_38607 ( "Team" text, "Recopa 1995" text, "Supercopa 1995" text, "CONMEBOL 1995" text, "Copa Libertadores 1996" text )
SELECT battery___mah__ FROM table WHERE nfc = "Yes" AND weight = "126g"
If the weight is 126g and the NFC is yes, what is the battery (MAH)?
CREATE TABLE table (battery___mah__ VARCHAR, nfc VARCHAR, weight VARCHAR)
SELECT lees_team FROM table_23575917_4 WHERE episode = "4x04"
Who is the Lees Team for episode 4x04?
CREATE TABLE table_23575917_4 (lees_team VARCHAR, episode VARCHAR)
SELECT "Score" FROM table_46084 WHERE "Date" = 'january 23'
What is the Score on January 23?
CREATE TABLE table_46084 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
SELECT platform FROM table WHERE weight = "131.5g"
What is the platform if the weight is 131.5g?
CREATE TABLE table (platform VARCHAR, weight VARCHAR)
SELECT davids_team FROM table_23575917_4 WHERE lees_team = "Jack Dee and Peter Serafinowicz"
Who is on the David's Team for the episode with the Lees Team of Jack Dee and Peter Serafinowicz
CREATE TABLE table_23575917_4 (davids_team VARCHAR, lees_team VARCHAR)
SELECT FIRST_NAME, DEPARTMENT_ID FROM employees ORDER BY DEPARTMENT_ID
Bar chart of department_id from each first name, and show in ascending by the y-axis.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) )
SELECT android_version FROM table WHERE code_name = "Lotus"
What is the Android version is the code name is Lotus?
CREATE TABLE table (android_version VARCHAR, code_name VARCHAR)
SELECT COUNT(davids_team) FROM table_23575917_4 WHERE lees_team = "Deborah Meaden and Mark Watson"
How many David's team for the Lees Team of Deborah Meaden and Mark Watson?
CREATE TABLE table_23575917_4 (davids_team VARCHAR, lees_team VARCHAR)
SELECT "Year" FROM table_41525 WHERE "Outcome" = 'runner-up' AND "Score" = '4–6, 6–4, [8–10]'
In what year was Xavier Malisse the runner-up with scores of 4 6, 6 4, [8 10]?
CREATE TABLE table_41525 ( "Outcome" text, "Year" text, "Championship" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
SELECT copper_age FROM table_23537091_1 WHERE ubaid_period_in_mesopotamia = "Middle Assyrian Empire"
When middle assyrian empire is the ubaid period in mesopotamia what is the copper age?
CREATE TABLE table_23537091_1 (copper_age VARCHAR, ubaid_period_in_mesopotamia VARCHAR)
SELECT COUNT(first_broadcast) FROM table_23575917_7 WHERE episode = "6x03"
If the episode is 6x03, what is the first broadcast total number?
CREATE TABLE table_23575917_7 (first_broadcast VARCHAR, episode VARCHAR)
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-199074' AND patient.hospitaldischargetime IS NULL)) AND medication.routeadmin = 'oral mucosa' ORDER BY medication.drugstarttime DESC LIMIT 1
when was the last time that patient 022-199074 was prescribed a medication via the oral mucosa route in their current hospital visit?
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 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 cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime 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 treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time )
SELECT copper_age FROM table_23537091_1 WHERE ubaid_period_in_mesopotamia = "Hittite Old Kingdom , Minoan eruption"
When hittite old kingdom , minoan eruption is the ubaid period in mesopotamia what is the copper age?
CREATE TABLE table_23537091_1 (copper_age VARCHAR, ubaid_period_in_mesopotamia VARCHAR)
SELECT COUNT(first_broadcast) FROM table_23575917_7 WHERE lees_team = "Clare Balding and Miranda Hart"
If the lees team is Clare Balding and Miranda Hart, what is the first broadcast total number?
CREATE TABLE table_23575917_7 (first_broadcast VARCHAR, lees_team VARCHAR)
SELECT venue FROM table_name_47 WHERE home_team = "geelong"
Which Venue was used when the Home team was geelong?
CREATE TABLE table_name_47 ( venue VARCHAR, home_team VARCHAR )
SELECT COUNT(early_chalcolithic) FROM table_23537091_1 WHERE ubaid_period_in_mesopotamia = "Hittite Middle Kingdom , New Kingdom of Egypt"
When hittite middle kingdom , new kingdom of egypt is the ubaid period in mesopotamia how many early chalcolithics are there?
CREATE TABLE table_23537091_1 (early_chalcolithic VARCHAR, ubaid_period_in_mesopotamia VARCHAR)
SELECT scores FROM table_23575917_7 WHERE lees_team = "Clare Balding and Miranda Hart"
If the lees team is Clare Balding and Miranda Hart, what was the score?
CREATE TABLE table_23575917_7 (scores VARCHAR, lees_team VARCHAR)
SELECT game_modes FROM table_name_13 WHERE pinyin = "chāojí mǎlìōu shìjiè"
Which game modes have Pinyin of ch oj m l u sh ji ?
CREATE TABLE table_name_13 ( game_modes VARCHAR, pinyin VARCHAR )
SELECT COUNT(early_chalcolithic) FROM table_23537091_1 WHERE ubaid_period_in_mesopotamia = "Second Intermediate Period of Egypt"
When the second intermediate period of egypt is the ubaid period in mesopotamia how many early calcolithics are there?
CREATE TABLE table_23537091_1 (early_chalcolithic VARCHAR, ubaid_period_in_mesopotamia VARCHAR)
SELECT MAX(position) FROM table_23585197_3 WHERE date_eliminated = "11 November"
What is the position of the song that was eliminated on 11 november?
CREATE TABLE table_23585197_3 (position INTEGER, date_eliminated VARCHAR)
SELECT COUNT("No. in season") FROM table_74203 WHERE "Title" = 'That''s So Sonny'
how man episodes in the season were titled 'that's so sonny'?
CREATE TABLE table_74203 ( "No. in series" text, "No. in season" text, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" text, "U.S. viewers (millions)" text )
SELECT result FROM table_23563375_11 WHERE opponent = "Loic Didavi"
What was the score against Loic Didavi?
CREATE TABLE table_23563375_11 (result VARCHAR, opponent VARCHAR)
SELECT artist FROM table_23585197_3 WHERE songwriter_s_ = "Ingela Hemming"
Which artist sang the song that ingela hemming wrote?
CREATE TABLE table_23585197_3 (artist VARCHAR, songwriter_s_ VARCHAR)
SELECT SUM("Points") FROM table_36661 WHERE "Season" = '2007'
What is total amount of points for the 2007 season?
CREATE TABLE table_36661 ( "Season" real, "Driver" text, "Team" text, "Tyre" text, "Points" real )
SELECT against FROM table_23563375_11 WHERE w_l = "Loss" AND round = "GI PO"
Who was played against when there was a loss and in the gi po round?
CREATE TABLE table_23563375_11 (against VARCHAR, w_l VARCHAR, round VARCHAR)
SELECT position FROM table_23585197_3 WHERE songwriter_s_ = "Adam Sandahl"
What is the position of the song that adam sandahl wrote?
CREATE TABLE table_23585197_3 (position VARCHAR, songwriter_s_ VARCHAR)
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'san francisco' AND restaurant.id = location.restaurant_id AND restaurant.name = 'jamerican cuisine'
where is jamerican cuisine in san francisco ?
CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_name varchar ) CREATE TABLE geographic ( city_name varchar, county varchar, region varchar )
SELECT w_l FROM table_23563375_11 WHERE result = "2–6, 5–7, 7–6 (11–9) , 1–6"
What were the w/l when the final score was 2–6, 5–7, 7–6 (11–9) , 1–6?
CREATE TABLE table_23563375_11 (w_l VARCHAR, result VARCHAR)
SELECT position FROM table_23585197_3 WHERE artist = "Genjor McNell"
What is the position of the song thar genjor mcnell performed?
CREATE TABLE table_23585197_3 (position VARCHAR, artist VARCHAR)
SELECT nationality FROM table_name_12 WHERE pick = 16
Name the nationality for pick of 16
CREATE TABLE table_name_12 ( nationality VARCHAR, pick VARCHAR )
SELECT playoffs FROM table_2357201_1 WHERE regular_season = "2nd, Great Lakes"
When Cleveland was 2nd, great lakes in the regular season what did they get to in the playoffs?
CREATE TABLE table_2357201_1 (playoffs VARCHAR, regular_season VARCHAR)
SELECT MIN(week) FROM table_23624542_4 WHERE attendance = 10402
What week has an attendance of 10402
CREATE TABLE table_23624542_4 (week INTEGER, attendance VARCHAR)
SELECT "No. of Events" FROM table_65794 WHERE "Country" = 'trinidad and tobago' AND "Date" = 'march 30-april 1'
How many Events have a Country of trinidad and tobago, and a Date of march 30-april 1?
CREATE TABLE table_65794 ( "Edition" text, "Year" text, "City" text, "Country" text, "Date" text, "No. of Events" real, "Top Team" text )
SELECT MIN(division) FROM table_2357201_1
What is the lowest numbered division Cleveland played in?
CREATE TABLE table_2357201_1 (division INTEGER)
SELECT record FROM table_23624542_4 WHERE date = "Sept 22"
What is the record on Sept 22?
CREATE TABLE table_23624542_4 (record VARCHAR, date VARCHAR)
SELECT lot_details, COUNT(lot_details) FROM Investors AS T1 JOIN Lots AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" GROUP BY lot_details ORDER BY lot_details DESC
Return the lot details of lots that belong to investors with details 'l', and count them by a bar chart, and I want to rank by the bar in descending.
CREATE TABLE Ref_Transaction_Types ( transaction_type_code VARCHAR(10), transaction_type_description VARCHAR(80) ) CREATE TABLE Investors ( investor_id INTEGER, Investor_details VARCHAR(255) ) CREATE TABLE Transactions ( transaction_id INTEGER, investor_id INTEGER, transaction_type_code VARCHAR(10), date_of_transaction DATETIME, amount_of_transaction DECIMAL(19,4), share_count VARCHAR(40), other_details VARCHAR(255) ) CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Sales ( sales_transaction_id INTEGER, sales_details VARCHAR(255) ) CREATE TABLE Lots ( lot_id INTEGER, investor_id INTEGER, lot_details VARCHAR(255) ) CREATE TABLE Transactions_Lots ( transaction_id INTEGER, lot_id INTEGER )
SELECT regular_season FROM table_2357201_1 WHERE year = 2006
How did Cleveland do in the regular season in 2006?
CREATE TABLE table_2357201_1 (regular_season VARCHAR, year VARCHAR)
SELECT release_date FROM table_23649244_2 WHERE artist_1 = "Wolfgang Gartner"
If artist 1 is Wolfgang Gartner, what is the release date?
CREATE TABLE table_23649244_2 (release_date VARCHAR, artist_1 VARCHAR)
SELECT "Date" FROM table_41912 WHERE "Centerfold model" = 'shannon long'
When was Shannon Long the Centerfold model?
CREATE TABLE table_41912 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text )
SELECT open_cup FROM table_2357201_1 WHERE year = 2009
How did Cleveland do in the Open Cup in 2009?
CREATE TABLE table_2357201_1 (open_cup VARCHAR, year VARCHAR)
SELECT song_1_title FROM table_23649244_2 WHERE artist_1 = "Danny Byrd"
What is song 1 title is the artist is Danny Byrd?
CREATE TABLE table_23649244_2 (song_1_title VARCHAR, artist_1 VARCHAR)
SELECT SUM("GNIS Feature ID") FROM table_54093 WHERE "County" = 'idaho'
What is the total GNIS Feature ID with a County of idaho?
CREATE TABLE table_54093 ( "Name" text, "GNIS Feature ID" real, "State" text, "County" text, "Type" text, "USGS 7.5' Map" text )
SELECT scores FROM table_23575917_6 WHERE lees_team = "Victoria Coren and Rhod Gilbert"
When victoria coren and rhod gilbert are both on the lees team what is the score?
CREATE TABLE table_23575917_6 (scores VARCHAR, lees_team VARCHAR)
SELECT mix_pack FROM table_23649244_2 WHERE artist_2 = "Eminem"
What is the mix pack when the artist 2 is Eminem?
CREATE TABLE table_23649244_2 (mix_pack VARCHAR, artist_2 VARCHAR)
SELECT "Runner-up" FROM table_71517 WHERE "Margin of victory" = '10 strokes'
Which runner-up has a 10 strokes margin of victory?
CREATE TABLE table_71517 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner-up" text )
SELECT first_broadcast FROM table_23575917_6 WHERE davids_team = "David O'Doherty and Katherine Parkinson"
When david o'doherty and katherine parkinson are both on the davids team when is the first broadcast?
CREATE TABLE table_23575917_6 (first_broadcast VARCHAR, davids_team VARCHAR)
SELECT serbs FROM table_2374338_2 WHERE hungarians = "9.26%"
What is every value for Serbs if value for Hungarians is 9.26%?
CREATE TABLE table_2374338_2 (serbs VARCHAR, hungarians VARCHAR)
SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details
What are the ids and details for all organizations that have grants of more than 6000 dollars.
CREATE TABLE Research_Staff ( staff_id INTEGER, employer_organisation_id INTEGER, staff_details VARCHAR(255) ) CREATE TABLE Documents ( document_id INTEGER, document_type_code VARCHAR(10), grant_id INTEGER, sent_date DATETIME, response_received_date DATETIME, other_details VARCHAR(255) ) CREATE TABLE Projects ( project_id INTEGER, organisation_id INTEGER, project_details VARCHAR(255) ) CREATE TABLE Grants ( grant_id INTEGER, organisation_id INTEGER, grant_amount DECIMAL(19,4), grant_start_date DATETIME, grant_end_date DATETIME, other_details VARCHAR(255) ) CREATE TABLE Tasks ( task_id INTEGER, project_id INTEGER, task_details VARCHAR(255), "eg Agree Objectives" VARCHAR(1) ) CREATE TABLE Document_Types ( document_type_code VARCHAR(10), document_description VARCHAR(255) ) CREATE TABLE Project_Outcomes ( project_id INTEGER, outcome_code VARCHAR(10), outcome_details VARCHAR(255) ) CREATE TABLE Project_Staff ( staff_id DOUBLE, project_id INTEGER, role_code VARCHAR(10), date_from DATETIME, date_to DATETIME, other_details VARCHAR(255) ) CREATE TABLE Staff_Roles ( role_code VARCHAR(10), role_description VARCHAR(255) ) CREATE TABLE Organisations ( organisation_id INTEGER, organisation_type VARCHAR(10), organisation_details VARCHAR(255) ) CREATE TABLE Research_Outcomes ( outcome_code VARCHAR(10), outcome_description VARCHAR(255) ) CREATE TABLE Organisation_Types ( organisation_type VARCHAR(10), organisation_type_description VARCHAR(255) )
SELECT episode FROM table_23575917_6 WHERE davids_team = "Bill Oddie and Frank Skinner"
When bill oddie and frank skinner are both on the davids team what is the episode?
CREATE TABLE table_23575917_6 (episode VARCHAR, davids_team VARCHAR)
SELECT MAX(population) FROM table_2374338_2
What is the largest value of population?
CREATE TABLE table_2374338_2 (population INTEGER)
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-28507')) AND intakeoutput.celllabel = 'chest tube' AND intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day')
how much chest tube did patient 013-28507 produce today?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE 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 lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime 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 cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time )
SELECT scores FROM table_23575917_6 WHERE lees_team = "Kevin Bridges and Katy Wix"
When kevin bridges and katy wix are both on the less team what is the score?
CREATE TABLE table_23575917_6 (scores VARCHAR, lees_team VARCHAR)
SELECT COUNT(germans) FROM table_2374338_2 WHERE slovaks = "0.11%"
How many values for Germans occurs when value for Slovaks is 0.11%?
CREATE TABLE table_2374338_2 (germans VARCHAR, slovaks VARCHAR)
SELECT MIN(first_elected) FROM table_1341472_20
What is the first election year listed?
CREATE TABLE table_1341472_20 ( first_elected INTEGER )
SELECT COUNT(episode) FROM table_23575917_8 WHERE davids_team = "Vernon Kay and Dara Ó Briain"
How many shows did team David consist of vernon kay and dara ó briain
CREATE TABLE table_23575917_8 (episode VARCHAR, davids_team VARCHAR)
SELECT MIN(population) FROM table_2374338_2 WHERE serbs = "73.53%"
What is the smallest value of population if the value for Serbs is 73.53%?
CREATE TABLE table_2374338_2 (population INTEGER, serbs VARCHAR)
SELECT "1st Ship Delivery Date" FROM table_16878 WHERE "Total Number of Ways" = '12 ways'
When was the delevery date when there were 12 ways of delivery?
CREATE TABLE table_16878 ( "Yard Name" text, "Location (city, state)" text, "1st Ship Delivery Date" text, "Ship Types Delivered" text, "Total Number of Ways" text, "total vessels built" text )
SELECT represented FROM table_23576576_2 WHERE hometown = "Windhoek"
If the hometown is Windhoek, what is the represented?
CREATE TABLE table_23576576_2 (represented VARCHAR, hometown VARCHAR)
SELECT croats FROM table_2374338_2 WHERE roma = "3.1%"
What is every value for Croats if the value of Roma is 3.1%?
CREATE TABLE table_2374338_2 (croats VARCHAR, roma VARCHAR)
SELECT district FROM table_23214055_2 WHERE nairs = "8.2"
Name the district for nairs 8.2
CREATE TABLE table_23214055_2 ( district VARCHAR, nairs VARCHAR )
SELECT contestant FROM table_23576576_2 WHERE hometown = "Omuthiya"
If the hometown is Omuthiya, what is the contestant name?
CREATE TABLE table_23576576_2 (contestant VARCHAR, hometown VARCHAR)
SELECT croats FROM table_2374338_2 WHERE romanians = "16.65%"
What is every value for Croats when value for Romanians is 16.65%?
CREATE TABLE table_2374338_2 (croats VARCHAR, romanians VARCHAR)
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%santiago%chile%' ORDER BY Reputation DESC
Top users: Santiago de Chile. List of Santiago-based users by reputation score. Forked from an original query by BoltClock.
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 PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) 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 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 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 PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) 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 PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, 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 CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE ReviewTaskResultTypes ( 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 Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text )
SELECT height__in_ FROM table_23576576_2 WHERE represented = "Erongo"
What is the height in inches if the represented is Erongo?
CREATE TABLE table_23576576_2 (height__in_ VARCHAR, represented VARCHAR)
SELECT COUNT(nasl_years) FROM table_237757_9 WHERE accolades__pre_nasl_ = "Captained England to victory at the 1966 World Cup"
How many years of nasl years did the accolades read "captained england to victory at the 1966 world cup"?
CREATE TABLE table_237757_9 (nasl_years VARCHAR, accolades__pre_nasl_ VARCHAR)
SELECT pname FROM player WHERE ycard = 'yes' ORDER BY hs DESC
What are the name of the players who received a card in descending order of the hours of training?
CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text )
SELECT COUNT(week) FROM table_23601267_2 WHERE date = "September 29"
What week did September 29 fall in?
CREATE TABLE table_23601267_2 (week VARCHAR, date VARCHAR)
SELECT nasl_club_s_ FROM table_237757_9 WHERE accolades__pre_nasl_ = "Won several titles with Leeds United"
What nasl club won several titles with leeds united?
CREATE TABLE table_237757_9 (nasl_club_s_ VARCHAR, accolades__pre_nasl_ VARCHAR)
SELECT "Chord" FROM table_64375 WHERE "Minor seventh" = 'f'
What is the listed chord for a Minor seventh of F?
CREATE TABLE table_64375 ( "Chord" text, "Root" text, "Major third" text, "Augmented fifth" text, "Minor seventh" text )
SELECT final_score FROM table_23601267_2 WHERE date = "October 28"
What was the score on the October 28 game?
CREATE TABLE table_23601267_2 (final_score VARCHAR, date VARCHAR)
SELECT nasl_years FROM table_237757_9 WHERE player = "Bobby Moore"
What years did Bobby Moore play?
CREATE TABLE table_237757_9 (nasl_years VARCHAR, player VARCHAR)
SELECT ACC_Road, COUNT(ACC_Road) FROM basketball_match GROUP BY ACC_Road ORDER BY COUNT(ACC_Road) DESC
Return a bar chart about the distribution of ACC_Road and the amount of ACC_Road , and group by attribute ACC_Road, and list in descending by the Y-axis.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text )
SELECT final_score FROM table_23601267_2 WHERE date = "September 20"
What was the score on September 20?
CREATE TABLE table_23601267_2 (final_score VARCHAR, date VARCHAR)
SELECT position FROM table_237757_9 WHERE nasl_club_s_ = "Philadelphia Fury"
What position is Philadelphia Fury?
CREATE TABLE table_237757_9 (position VARCHAR, nasl_club_s_ VARCHAR)
SELECT date FROM table_name_42 WHERE total < 19 AND venue = "anz stadium"
What day was the total smaller than 19 at Venue of anz stadium?
CREATE TABLE table_name_42 ( date VARCHAR, total VARCHAR, venue VARCHAR )
SELECT main_artillery FROM table_23614702_1 WHERE warship = "Blanco Encalada"
What's Blanco Encalada's main artillery?
CREATE TABLE table_23614702_1 (main_artillery VARCHAR, warship VARCHAR)
SELECT COUNT(nasl_years) FROM table_237757_9 WHERE player = "Peter Lorimer"
How many years did Peter Lorimer play?
CREATE TABLE table_237757_9 (nasl_years VARCHAR, player VARCHAR)
SELECT connection_with_australia FROM table_name_74 WHERE connection_with_america = "born in the u.s.; mother is u.s. citizen"
What is the connection with Australia when the connection with America shows born in the u.s.; mother is u.s. citizen?
CREATE TABLE table_name_74 ( connection_with_australia VARCHAR, connection_with_america VARCHAR )
SELECT COUNT(horse__power) FROM table_23614702_1 WHERE warship = "Cochrane"
How many different horse-powers does the Cochrane have?
CREATE TABLE table_23614702_1 (horse__power VARCHAR, warship VARCHAR)
SELECT highest FROM table_237757_10 WHERE average = 10295
What was the entry for highest when average is 10295?
CREATE TABLE table_237757_10 (highest VARCHAR, average VARCHAR)
SELECT "3rd round" FROM table_65430 WHERE "1st round" = '—'
Which 3rd round has a 1st round of ?
CREATE TABLE table_65430 ( "Season" text, "1st round" text, "2nd round" text, "3rd round" text, "Finals" text )