answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT Id AS "user_link", Reputation, CreationDate, LastAccessDate FROM Users WHERE AboutMe LIKE '%##text##%'
find users with about me text like.
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 PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense 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 PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE 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 Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress 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 SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) 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 CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time )
SELECT audition_venue FROM table_27615445_1 WHERE guest_fourth_judge = "Peninha"
Where was the audition venue where Peninha was the guest fourth judge?
CREATE TABLE table_27615445_1 (audition_venue VARCHAR, guest_fourth_judge VARCHAR)
SELECT MAX(points) FROM table_name_80 WHERE position = 5 AND played < 18
Which Points is the highest one that has a Position of 5, and a Played smaller than 18?
CREATE TABLE table_name_80 (points INTEGER, position VARCHAR, played VARCHAR)
SELECT COUNT(rank) FROM table_19870086_24 WHERE player = "Adam Gilchrist"
what is the rank of adam gilchrist
CREATE TABLE table_19870086_24 ( rank VARCHAR, player VARCHAR )
SELECT song_choice FROM table_27616663_1 WHERE original_artist = "Marisa Monte"
Which song was picked that was originally performed by Marisa Monte?
CREATE TABLE table_27616663_1 (song_choice VARCHAR, original_artist VARCHAR)
SELECT AVG(drawn) FROM table_name_76 WHERE position < 9 AND points < 22 AND lost < 9 AND against > 29
Which Drawn is the average one that has a Position smaller than 9, and Points smaller than 22, and a Lost smaller than 9, and an Against larger than 29?
CREATE TABLE table_name_76 (drawn INTEGER, against VARCHAR, lost VARCHAR, position VARCHAR, points VARCHAR)
SELECT "Title" FROM table_20545 WHERE "No. in season" = '4'
Which title was No. 4 in season?
CREATE TABLE table_20545 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written By" text, "Originalairdate" text, "TV Broadcast" text )
SELECT result FROM table_27616663_1 WHERE original_artist = "Caetano Veloso"
What was the result of the performance of the song by Caetano Veloso?
CREATE TABLE table_27616663_1 (result VARCHAR, original_artist VARCHAR)
SELECT COUNT(against) FROM table_name_54 WHERE played < 18
How many Against have Played smaller than 18?
CREATE TABLE table_name_54 (against VARCHAR, played INTEGER)
SELECT "2011" FROM table_61653 WHERE "2007" = 'a' AND "2008" = '3r'
WHAT IS THE 2011 WITH 2007 AT A AND2 008 AT 3R?
CREATE TABLE table_61653 ( "Tournament" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
SELECT order__number FROM table_27616663_1 WHERE theme = "Male Singers"
What was the order # of the theme Male Singers?
CREATE TABLE table_27616663_1 (order__number VARCHAR, theme VARCHAR)
SELECT points_difference FROM table_name_66 WHERE points > 3 AND lost > 0
What is the points difference associated with more than 3 points and more than 0 losses?
CREATE TABLE table_name_66 (points_difference VARCHAR, points VARCHAR, lost VARCHAR)
SELECT area_in_1000km²__1930_ FROM table_11654169_1 WHERE voivodeship_separate_city = "lubelskie"
List all areas within 1000 km in the city of Lubelskie?
CREATE TABLE table_11654169_1 ( area_in_1000km²__1930_ VARCHAR, voivodeship_separate_city VARCHAR )
SELECT theme FROM table_27616663_1 WHERE original_artist = "Rosana"
What was the theme when original artist Rosana's song was performed?
CREATE TABLE table_27616663_1 (theme VARCHAR, original_artist VARCHAR)
SELECT points_difference FROM table_name_45 WHERE lost > 2 AND points > 1
What is the difference associated with more than 2 losses and more than 1 point?
CREATE TABLE table_name_45 (points_difference VARCHAR, lost VARCHAR, points VARCHAR)
SELECT LAST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
For those employees who do not work in departments with managers that have ids between 100 and 200, find last_name and employee_id , and visualize them by a bar chart.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,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 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 COUNT(week__number) FROM table_27614707_1 WHERE theme = "Judge's Choice" AND order__number = "4"
How many different weeks are there in order number 4 that were judge's choice?
CREATE TABLE table_27614707_1 (week__number VARCHAR, theme VARCHAR, order__number VARCHAR)
SELECT location FROM table_name_34 WHERE game = 64
What location did game 64 take place
CREATE TABLE table_name_34 (location VARCHAR, game VARCHAR)
SELECT Id AS "post_link", Score, ViewCount AS "views", OwnerUserId AS "asker", CreationDate AS "asked", ClosedDate AS "closed", LastEditDate AS "edited", CASE WHEN LastEditDate > ClosedDate THEN 'yes' ELSE 'no' END AS "edited_after_close?" FROM Posts WHERE NOT ClosedDate IS NULL AND Id IN (SELECT DISTINCT PostId FROM Comments WHERE UserId = '##UserID##') ORDER BY CreationDate DESC
Closed questions on which you COMMENTED (and whether they were edited after close).
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 ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId 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 VoteTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) 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 ReviewTaskTypes ( Id number, Name text, Description 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, 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 PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text )
SELECT song_choice FROM table_27614707_1 WHERE week__number = "Top 5" AND original_artist = "Marisa Monte"
What Marisa Monte song choice was song during top 5?
CREATE TABLE table_27614707_1 (song_choice VARCHAR, week__number VARCHAR, original_artist VARCHAR)
SELECT COUNT(attendance) FROM table_name_27 WHERE game_site = "tiger stadium" AND week > 7
What was the Attendance after Week 7 at Tiger Stadium?
CREATE TABLE table_name_27 (attendance VARCHAR, game_site VARCHAR, week VARCHAR)
SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME ORDER BY SUM(STU_GPA) DESC
Give me a histogram for what is the first name and GPA of every student that has a GPA lower than average?, could you rank by the y-axis from high to low?
CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP_DOB datetime ) CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) ) CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) )
SELECT original_artist FROM table_27614707_1 WHERE theme = "Top 12 Men"
Who was the original artist of the Top 12 Men theme?
CREATE TABLE table_27614707_1 (original_artist VARCHAR, theme VARCHAR)
SELECT AVG(attendance) FROM table_name_71 WHERE result = "w 21–7"
What was the Attendance at the Game with a Result of w 21–7?
CREATE TABLE table_name_71 (attendance INTEGER, result VARCHAR)
SELECT "total" FROM table_203_61 WHERE "nation" = 'south africa'
the total number of medals won by south africa was how many ?
CREATE TABLE table_203_61 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT result FROM table_27614707_1 WHERE theme = "Top 12 Men"
What was the result of the Top 12 Men theme?
CREATE TABLE table_27614707_1 (result VARCHAR, theme VARCHAR)
SELECT COUNT(year) FROM table_name_4 WHERE make__model = "new flyer c40lfr"
How many years have a Make/ Model of new flyer c40lfr?
CREATE TABLE table_name_4 (year VARCHAR, make__model VARCHAR)
SELECT School_ID, ACC_Percent FROM basketball_match GROUP BY All_Road
Show me about the correlation between School_ID and ACC_Percent , and group by attribute All_Road in a scatter chart.
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 week__number FROM table_27614707_1 WHERE result = "Bottom 3"
What week number was the result bottom 3?
CREATE TABLE table_27614707_1 (week__number VARCHAR, result VARCHAR)
SELECT make__model FROM table_name_36 WHERE numbers__quantity_ordered_ = "1461–1500 (40 buses)"
Which Make/ Model that Numbers (Quantity Ordered) of 1461–1500 (40 buses)?
CREATE TABLE table_name_36 (make__model VARCHAR, numbers__quantity_ordered_ VARCHAR)
SELECT ACC_Road, Team_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY ACC_Road
Visualize a bar chart about the distribution of ACC_Road and Team_ID , and group by attribute All_Home, list ACC_Road in ascending order please.
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text )
SELECT points_per_game FROM table_2761641_1 WHERE assists_per_game = "1.5"
How many points per game did he have when he had 1.5 assists per game?
CREATE TABLE table_2761641_1 (points_per_game VARCHAR, assists_per_game VARCHAR)
SELECT fuel_propulsion FROM table_name_34 WHERE numbers__quantity_ordered_ = "7124-7156 (33 buses)"
Which Fuel Propulsion has Numbers (Quantity Ordered) of 7124-7156 (33 buses)?
CREATE TABLE table_name_34 (fuel_propulsion VARCHAR, numbers__quantity_ordered_ VARCHAR)
SELECT SUM(silver) FROM table_name_19 WHERE total < "6" AND rank = "6" AND nation = "bulgaria"
What is the sum of Silver when the total is less than 6, the rank is 6 and the Bulgaria is the nation?
CREATE TABLE table_name_19 ( silver INTEGER, nation VARCHAR, total VARCHAR, rank VARCHAR )
SELECT rebounds_per_game FROM table_2761641_1 WHERE tournament = "2006 FIBA World Championship"
How many rebounds per game did he have at the 2006 fiba world championship?
CREATE TABLE table_2761641_1 (rebounds_per_game VARCHAR, tournament VARCHAR)
SELECT numbers__quantity_ordered_ FROM table_name_96 WHERE fuel_propulsion = "cng" AND year < 2008 AND make__model = "nabi 40-lfw"
Which Numbers (Quantity Ordered) have a Fuel Propulsion of cng, and a Year smaller than 2008, and a Make/ Model of nabi 40-lfw?
CREATE TABLE table_name_96 (numbers__quantity_ordered_ VARCHAR, make__model VARCHAR, fuel_propulsion VARCHAR, year VARCHAR)
SELECT demographic.diagnosis, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "18077"
what is primary disease and procedure icd9 code of subject id 18077?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 )
SELECT rebounds_per_game FROM table_2761641_1 WHERE tournament = "2003 EuroBasket"
How many rebounds per game did he have at the 2003 eurobasket?
CREATE TABLE table_2761641_1 (rebounds_per_game VARCHAR, tournament VARCHAR)
SELECT numbers__quantity_ordered_ FROM table_name_88 WHERE make__model = "eldorado national passport"
Which Numbers (Quantity Ordered) have a Make/ Model of eldorado national passport?
CREATE TABLE table_name_88 (numbers__quantity_ordered_ VARCHAR, make__model VARCHAR)
SELECT COUNT("Podiums") FROM table_3563 WHERE "Team" = 'Carlin'
how many seasons did he race in team Carlin?
CREATE TABLE table_3563 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text )
SELECT assists_per_game FROM table_2761641_1 WHERE points_per_game = "6.8"
How many assists per game did he have when he had 6.8 points per game?
CREATE TABLE table_2761641_1 (assists_per_game VARCHAR, points_per_game VARCHAR)
SELECT MIN(year) FROM table_name_78 WHERE college = "alabama" AND pick < 26
What is the earliest year for Alabama with a pick under 26?
CREATE TABLE table_name_78 (year INTEGER, college VARCHAR, pick VARCHAR)
SELECT "Owner" FROM table_53835 WHERE "Winner" = 'raglan road'
Who is the owner of the Raglan Road winner?
CREATE TABLE table_53835 ( "Year" text, "Winner" text, "Jockey" text, "Trainer" text, "Owner" text, "Distance" text, "Time" text, "Purse" text )
SELECT prod_code FROM table_27622417_1 WHERE no_in_series = 87
which is the production code when the number of the episode in series is 87?
CREATE TABLE table_27622417_1 (prod_code VARCHAR, no_in_series VARCHAR)
SELECT player FROM table_name_23 WHERE year > 2010 AND pick = 2
Which player was pick 2 later than 2010?
CREATE TABLE table_name_23 (player VARCHAR, year VARCHAR, pick VARCHAR)
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY Sex DESC
A bar chart about what are the average ages for male and female students?, and could you rank by the bars in desc?
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) )
SELECT no_in_series FROM table_27622417_1 WHERE prod_code = "405"
what is the number of the episode in the series whose production code is 405?
CREATE TABLE table_27622417_1 (no_in_series VARCHAR, prod_code VARCHAR)
SELECT position FROM table_name_31 WHERE pick > 28
Which position has a pick greater than 28?
CREATE TABLE table_name_31 (position VARCHAR, pick INTEGER)
SELECT code__iata_icao_ FROM table_name_18 WHERE rank = 10
What is the code for rank 10?
CREATE TABLE table_name_18 ( code__iata_icao_ VARCHAR, rank VARCHAR )
SELECT original_us_air_date FROM table_27622417_1 WHERE prod_code = "415"
when was the premiere of the episode whose production code is 415?
CREATE TABLE table_27622417_1 (original_us_air_date VARCHAR, prod_code VARCHAR)
SELECT opponent FROM table_name_14 WHERE date = "august 25"
what team played on august 25
CREATE TABLE table_name_14 (opponent VARCHAR, date VARCHAR)
SELECT p.Id, p.Body FROM Posts AS p WHERE p.Body LIKE '%http://%.jpg%' AND (NOT p.Body LIKE '%]: http://%' AND NOT p.Body LIKE '%<img src=%')
Images linked rather than displayed.
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) 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 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 FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) 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 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 TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE CloseReasonTypes ( 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 ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount 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 PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) 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 ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text )
SELECT written_by FROM table_27622417_1 WHERE prod_code = "411"
who were the writers in the episode whose production code was 411?
CREATE TABLE table_27622417_1 (written_by VARCHAR, prod_code VARCHAR)
SELECT class FROM table_name_83 WHERE stages_won = "0" AND vehicle = "hummer" AND year < 2009
What class is associated with 0 stages won, a hummer, and before 2009?
CREATE TABLE table_name_83 (class VARCHAR, year VARCHAR, stages_won VARCHAR, vehicle VARCHAR)
SELECT "Jason" FROM table_24208 WHERE "Public Vote %" = '19.20%'
Name the jason for public vote being 19.20%
CREATE TABLE table_24208 ( "Order" real, "Couple" text, "Karen" text, "Nicky" text, "Jason" text, "Ruthie" text, "Robin" text, "Total" text, "Scoreboard" text, "Song" text, "Public Vote %" text, "Result" text )
SELECT directed_by FROM table_27622417_1 WHERE no_in_season = 17
who were the director of the episode whose number in the season is 17?
CREATE TABLE table_27622417_1 (directed_by VARCHAR, no_in_season VARCHAR)
SELECT position FROM table_name_59 WHERE year = 2012
What position did he finish in 2012?
CREATE TABLE table_name_59 (position VARCHAR, year VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.age < "89"
give me the number of patients whose ethnicity is black/cape verdean and age is less than 89?
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 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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT currency FROM table_2764267_2 WHERE negotiable_debt_at_mid_2005___us_dollar_bn_equivalent_ = 1300
Name the currency for negotiable debt being 1300
CREATE TABLE table_2764267_2 (currency VARCHAR, negotiable_debt_at_mid_2005___us_dollar_bn_equivalent_ VARCHAR)
SELECT year FROM table_name_59 WHERE class = "car" AND stages_won = "0"
What year did he compete in the car class and win 0 stages?
CREATE TABLE table_name_59 (year VARCHAR, class VARCHAR, stages_won VARCHAR)
SELECT "Third" FROM table_10757 WHERE "Location" = 'winterberg' AND "Second" = 'monique riekewald'
In Winterberg, who was 3rd the year that Monique Riekewald was 2nd?
CREATE TABLE table_10757 ( "Year" real, "Location" text, "Champion" text, "Second" text, "Third" text )
SELECT country FROM table_2764267_2 WHERE currency = "Yen"
Name the country that has the yen
CREATE TABLE table_2764267_2 (country VARCHAR, currency VARCHAR)
SELECT position FROM table_name_16 WHERE division = "west" AND week = "february 12"
on week of february 12, in the west division, what is the position?
CREATE TABLE table_name_16 (position VARCHAR, division VARCHAR, week VARCHAR)
SELECT city, COUNT(*) FROM airports GROUP BY city HAVING COUNT(*) > 1
List the cities which have more than one airport and number of airports.
CREATE TABLE airports ( city VARCHAR )
SELECT COUNT(country) FROM table_2764267_2 WHERE currency = "US dollar"
Name the number of countries that have the us dollar
CREATE TABLE table_2764267_2 (country VARCHAR, currency VARCHAR)
SELECT location FROM table_name_47 WHERE _number_found = "4"
What is the listed Location with a # found of 4?
CREATE TABLE table_name_47 (location VARCHAR, _number_found VARCHAR)
SELECT "Bristol & N. Som" FROM table_72258 WHERE "Somerset" = 'Ashcott and Shapwick'
what is the bristol & n. som where the somerset is ashcott and shapwick?
CREATE TABLE table_72258 ( "Year" real, "Premier One" text, "Premier Two" text, "Bristol & Somerset" text, "Glos & Wilts" text, "Bristol & N. Som" text, "Somerset" text, "Gloucestershire" text, "Wiltshire" text )
SELECT country FROM table_2764267_2 WHERE currency = "US dollar"
Name the country for the us dollar
CREATE TABLE table_2764267_2 (country VARCHAR, currency VARCHAR)
SELECT ball_diameter FROM table_name_87 WHERE location = "el manati" AND period = "1200 bce"
What's the Ball Diameter with the Location oof El Manati, and the Period of 1200 BCE?
CREATE TABLE table_name_87 (ball_diameter VARCHAR, location VARCHAR, period VARCHAR)
SELECT MAX("Year") FROM table_19160 WHERE "5th District" = 'Howard A. Wassum'
What is the last year that Howard A. Wassum was in the 5th district?
CREATE TABLE table_19160 ( "Year" real, "1st District" text, "2nd District" text, "3rd District" text, "4th District" text, "5th District" text )
SELECT COUNT(team) FROM table_27631756_2 WHERE head_coach = "Mahdi Ali"
How many teams have a head coach named mahdi ali?
CREATE TABLE table_27631756_2 (team VARCHAR, head_coach VARCHAR)
SELECT ball_diameter FROM table_name_54 WHERE culture = "olmec"
What's the Ball Diameter with the Culture of Olmec?
CREATE TABLE table_name_54 (ball_diameter VARCHAR, culture VARCHAR)
SELECT margin_of_victory FROM table_name_69 WHERE date = "mar 18, 1979"
What was the margin of victory on Mar 18, 1979?
CREATE TABLE table_name_69 ( margin_of_victory VARCHAR, date VARCHAR )
SELECT COUNT(captain) FROM table_27631756_2 WHERE kitmaker = "N/A"
How many captains have the kitmaker as n/a?
CREATE TABLE table_27631756_2 (captain VARCHAR, kitmaker VARCHAR)
SELECT period FROM table_name_81 WHERE _number_found = "5"
What's the Period with # found of 5?
CREATE TABLE table_name_81 (period VARCHAR, _number_found VARCHAR)
SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 1
Show the average price range of hotels that have 5 star ratings and allow pets.
CREATE TABLE HOTELS ( price_range INTEGER, star_rating_code VARCHAR, pets_allowed_yn VARCHAR )
SELECT COUNT(kitmaker) FROM table_27631756_2 WHERE team = "Ittihad Kalba"
How many kitmaker correspond to team ittihad kalba?
CREATE TABLE table_27631756_2 (kitmaker VARCHAR, team VARCHAR)
SELECT country FROM table_name_61 WHERE name = "azeri tv tower"
Which Country has azeri tv tower?
CREATE TABLE table_name_61 (country VARCHAR, name VARCHAR)
SELECT yacht FROM table_25561560_3 WHERE skipper = "Andrew Saies"
What yacht did Andrew Saies sail on?
CREATE TABLE table_25561560_3 ( yacht VARCHAR, skipper VARCHAR )
SELECT captain FROM table_27631756_2 WHERE shirt_sponsor = "N/A"
What is the name of the captain when teh shirt sponsor is n/a?
CREATE TABLE table_27631756_2 (captain VARCHAR, shirt_sponsor VARCHAR)
SELECT pinnacle_height FROM table_name_31 WHERE name = "chimney of orot rabin"
What is Pinnacle height of chimney of orot rabin?
CREATE TABLE table_name_31 (pinnacle_height VARCHAR, name VARCHAR)
SELECT "Record" FROM table_65323 WHERE "Year" > '1974' AND "Finish" = '3rd'
Which Record has a Year larger than 1974, and a Finish of 3rd?
CREATE TABLE table_65323 ( "Year" real, "Record" text, "Finish" text, "Manager" text, "Playoffs" text )
SELECT COUNT(captain) FROM table_27631756_2 WHERE shirt_sponsor = "Toshiba"
How many captains when the shirt sponsor is toshiba?
CREATE TABLE table_27631756_2 (captain VARCHAR, shirt_sponsor VARCHAR)
SELECT country FROM table_name_37 WHERE pinnacle_height = "metres (ft)" AND name = "azeri tv tower"
Which Country has a Pinnacle height of metres (ft) and a Name of azeri tv tower?
CREATE TABLE table_name_37 (country VARCHAR, pinnacle_height VARCHAR, name VARCHAR)
SELECT "Result" FROM table_743 WHERE "Incumbent" = 'Clyde Doyle'
What was the result of the election of the incumbent clyde doyle?
CREATE TABLE table_743 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT chairman FROM table_27631756_2 WHERE captain = "Fawzi Bashir"
Who is the chairman when teh captain is fawzi bashir?
CREATE TABLE table_27631756_2 (chairman VARCHAR, captain VARCHAR)
SELECT town FROM table_name_29 WHERE structural_type = "guyed mast" AND country = "belgium"
Which Town has a Structural type of guyed mast and a Country of belgium?
CREATE TABLE table_name_29 (town VARCHAR, structural_type VARCHAR, country VARCHAR)
SELECT "Home team score" FROM table_53089 WHERE "Away team" = 'south melbourne'
Name the home team score when the away team is south melbourne
CREATE TABLE table_53089 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Date" text )
SELECT season FROM table_27631002_1 WHERE f_laps = 0 AND races = 2
Which season had f/laps is 0 and races is 2?
CREATE TABLE table_27631002_1 (season VARCHAR, f_laps VARCHAR, races VARCHAR)
SELECT main_use FROM table_name_54 WHERE name = "emley moor tower (mk.3)"
What is the Main use of emley moor tower (mk.3)?
CREATE TABLE table_name_54 (main_use VARCHAR, name VARCHAR)
SELECT SUM("Drawn") FROM table_8228 WHERE "Played" > '14'
What is the whole of Drawn that has a Played larger than 14?
CREATE TABLE table_8228 ( "Position" real, "Name" text, "Played" real, "Drawn" real, "Lost" real, "Points" real )
SELECT COUNT(points) FROM table_27631002_1 WHERE position = "6th"
How many entries are there for points for the 6th position?
CREATE TABLE table_27631002_1 (points VARCHAR, position VARCHAR)
SELECT main_use FROM table_name_75 WHERE country = "hungary" AND name = "transmitter solt"
What is the Main use of transmitter solt in Hungary?
CREATE TABLE table_name_75 (main_use VARCHAR, country VARCHAR, name VARCHAR)
SELECT "year of election" FROM table_203_330 ORDER BY "candidates elected" DESC LIMIT 1
year with largest number of candidates selected
CREATE TABLE table_203_330 ( id number, "year of election" number, "candidates elected" number, "# of seats available" number, "# of votes" number, "% of popular vote" text )
SELECT COUNT(season) FROM table_27631002_1 WHERE position = "2nd"
How many season are shown for the 2nd position?
CREATE TABLE table_27631002_1 (season VARCHAR, position VARCHAR)
SELECT date FROM table_name_56 WHERE race_title = "sandown"
what day was the sandown
CREATE TABLE table_name_56 (date VARCHAR, race_title VARCHAR)
SELECT * FROM table_train_178 WHERE hypoglycemia = 1 OR seizure_disorder = 1
history of severe hypoglycemia ( seizure )
CREATE TABLE table_train_178 ( "id" int, "gender" string, "pregnancy_or_lactation" bool, "hiv_infection" bool, "hepatitis_c" bool, "renal_disease" bool, "hypoglycemia" bool, "serum_creatinine" float, "seizure_disorder" bool, "body_mass_index_bmi" float, "NOUSE" float )
SELECT wins FROM table_27631002_1 WHERE position = "7th"
What are the wins for the 7th position?
CREATE TABLE table_27631002_1 (wins VARCHAR, position VARCHAR)
SELECT birth FROM table_name_52 WHERE became_duchess = "18 august 1593 husband's accession"
What is the Birth of the lady that has a Became Duchess on 18 august 1593 husband's accession?
CREATE TABLE table_name_52 (birth VARCHAR, became_duchess VARCHAR)
SELECT tournament FROM table_name_13 WHERE score = "6–3, 2–6, 6–3"
What Tournament had a Score of 6 3, 2 6, 6 3?
CREATE TABLE table_name_13 ( tournament VARCHAR, score VARCHAR )