answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT period FROM table_24565004_3 WHERE name = "Albert Baning"
during which period did albert baning play?
CREATE TABLE table_24565004_3 (period VARCHAR, name VARCHAR)
SELECT COUNT(gdp_per_capita) FROM table_2248991_2 WHERE nation = "Burkina Faso"
How many items are listed under gdp per capita under the nation of Burkina Faso?
CREATE TABLE table_2248991_2 ( gdp_per_capita VARCHAR, nation VARCHAR )
SELECT title FROM table_23799417_2 WHERE original_airing = "September 30, 2007"
what is the episode title on original air date of September 30, 2007?
CREATE TABLE table_23799417_2 (title VARCHAR, original_airing VARCHAR)
SELECT goals¹ FROM table_24565004_8 WHERE name = "Xavier Gravelaine"
What is the number of goals if the name is Xavier Gravelaine?
CREATE TABLE table_24565004_8 (goals¹ VARCHAR, name VARCHAR)
SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 8098 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hemododialysis hypotensn') AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', diagnoses_icd.charttime) = '01') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 8098 AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', prescriptions.startdate) = '01') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 day')
what is the name of the drug prescribed to patient 8098 within 2 days after diagnosis of hemododialysis hypotensn in 01/last year?
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text )
SELECT rating FROM table_23799417_2 WHERE rating / SHARE(18 AS –49) = 3.6
What is the rating if the rating/share (18-49) is 3.6?
CREATE TABLE table_23799417_2 (rating VARCHAR)
SELECT nationality² FROM table_24565004_8 WHERE name = "Patrick Grappin"
If the name is Patrick Grappin, what is the nationality?
CREATE TABLE table_24565004_8 (nationality² VARCHAR, name VARCHAR)
SELECT time FROM table_name_55 WHERE owner = "maine chance farm"
What time contains the owner of maine chance farm?
CREATE TABLE table_name_55 ( time VARCHAR, owner VARCHAR )
SELECT COUNT(rating) / SHARE(18 AS –49) FROM table_23799417_2 WHERE total_viewers__in_millions_ = "12.75"
What is the rating/share total number if the total viewers is 12.75 million?
CREATE TABLE table_23799417_2 (rating VARCHAR, total_viewers__in_millions_ VARCHAR)
SELECT COUNT(period) FROM table_24565004_8 WHERE name = "Geraldão"
What is the period total number if the name is Geraldão?
CREATE TABLE table_24565004_8 (period VARCHAR, name VARCHAR)
SELECT MAX(col__m_) FROM table_18946749_2 WHERE peak = "Barurumea Ridge"
What is the col (m) of the Barurumea Ridge peak?
CREATE TABLE table_18946749_2 ( col__m_ INTEGER, peak VARCHAR )
SELECT total_viewers__in_millions_ FROM table_23799417_2 WHERE rating = "9.1"
If the rating is 9.1, what was the total viewers?
CREATE TABLE table_23799417_2 (total_viewers__in_millions_ VARCHAR, rating VARCHAR)
SELECT nationality² FROM table_24565004_8 WHERE appearances¹ = 29
What is the nationality if the appearance is 29?
CREATE TABLE table_24565004_8 (nationality² VARCHAR, appearances¹ VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2150" AND prescriptions.route = "IV BOLUS"
how many patients who were admitted before the year 2150 had an iv bolus as the drug route?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 rating / SHARE(18 AS –49) FROM table_23793770_2 WHERE total_viewers__in_millions_ = "11.49"
What was the reating share when the total viewers was 11.49 million?
CREATE TABLE table_23793770_2 (rating VARCHAR, total_viewers__in_millions_ VARCHAR)
SELECT concacaf FROM table_245694_4 WHERE season = 2010
Name the concacaf for 2010 season
CREATE TABLE table_245694_4 (concacaf VARCHAR, season VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Bethanechol"
how many patients whose drug name is bethanechol?
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 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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT title FROM table_23793770_2 WHERE total_viewers__in_millions_ = "10.47"
What was the name of the show that had 10.47 million total viewers?
CREATE TABLE table_23793770_2 (title VARCHAR, total_viewers__in_millions_ VARCHAR)
SELECT MIN(season) FROM table_245694_4 WHERE us_open_cup = "Round of 32"
Name the least season for round of 32
CREATE TABLE table_245694_4 (season INTEGER, us_open_cup VARCHAR)
SELECT COUNT(*) FROM PostFeedback
Anonymous feedback votes over time.
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange 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 PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId 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 VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) 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 PostTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount 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 ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId 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 CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE 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 PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number )
SELECT COUNT(title) FROM table_23793770_2 WHERE total_viewers__in_millions_ = "12.46"
How many shows had 12.46 total viewers?
CREATE TABLE table_23793770_2 (title VARCHAR, total_viewers__in_millions_ VARCHAR)
SELECT COUNT(playoffs) FROM table_245694_4 WHERE concacaf = "Semifinals"
Name the number of playoffs for semifinals
CREATE TABLE table_245694_4 (playoffs VARCHAR, concacaf VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE"
How many female patients are American Indian/Alaska native?
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT MAX(sales), _receipts, _or_shipments__$1, 000 AS _ FROM table_23802822_1 WHERE establishments = 49319
If the establishment is 49319, what is the sales, receipts or shipments maximum amount?
CREATE TABLE table_23802822_1 (_receipts VARCHAR, _or_shipments__$1 VARCHAR, sales INTEGER, establishments VARCHAR)
SELECT COUNT(season) FROM table_24596664_1 WHERE position = "18th"
Name the number of season for 18th position
CREATE TABLE table_24596664_1 (season VARCHAR, position VARCHAR)
SELECT MAX(gold) FROM table_name_30 WHERE nation = "canada" AND silver < 7
With less than 7 Silver medals, how many Gold medals did Canada receive?
CREATE TABLE table_name_30 ( gold INTEGER, nation VARCHAR, silver VARCHAR )
SELECT sector FROM table_23802822_1 WHERE establishments = 110313
What is the sector is the establishment is 110313?
CREATE TABLE table_23802822_1 (sector VARCHAR, establishments VARCHAR)
SELECT MIN(wins) FROM table_24596664_1
Name the least wins
CREATE TABLE table_24596664_1 (wins INTEGER)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "53190"
how many patients had the diagnosis icd9 code 53190?
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 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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT COUNT(league) FROM table_2380212_1 WHERE avg_attendance = 3589
How many different Leagues had average attendance of 3589?
CREATE TABLE table_2380212_1 (league VARCHAR, avg_attendance VARCHAR)
SELECT COUNT(language_of_films) FROM table_2461720_1 WHERE theatre_name = "Méga-Plex Taschereau IMAX"
Name the total number of language of films for méga-plex taschereau imax
CREATE TABLE table_2461720_1 (language_of_films VARCHAR, theatre_name VARCHAR)
SELECT home_team FROM table_name_73 WHERE away_team = "footscray"
What home team played against Footscray as the away team?
CREATE TABLE table_name_73 ( home_team VARCHAR, away_team VARCHAR )
SELECT MIN(avg_attendance) FROM table_2380212_1 WHERE regular_season = "3rd, Central"
How many people saw the 3rd, Central regular season on average?
CREATE TABLE table_2380212_1 (avg_attendance INTEGER, regular_season VARCHAR)
SELECT theatre_name FROM table_2461720_1 WHERE language_of_films = "French"
Name the theatre name for french
CREATE TABLE table_2461720_1 (theatre_name VARCHAR, language_of_films VARCHAR)
SELECT "Points" FROM table_27581 WHERE "Rebounds" = '6' AND "Blocks" = '0'
What is every value for points if rebounds is 6 and blocks is 0?
CREATE TABLE table_27581 ( "Player" text, "Games Played" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real )
SELECT league FROM table_2380212_1 WHERE year = 2007
What League was played in 2007?
CREATE TABLE table_2380212_1 (league VARCHAR, year VARCHAR)
SELECT location FROM table_2461720_1 WHERE theatre_name = "Méga-Plex Taschereau IMAX"
Name the location for democratic méga-plex taschereau imax
CREATE TABLE table_2461720_1 (location VARCHAR, theatre_name VARCHAR)
SELECT ROUND(AVG(CASE WHEN QuestionScore < HighestAnswerScore THEN 100.0 ELSE 0.0 END), 2) AS "Percentage" FROM (SELECT q.Id, MAX(q.Score) AS QuestionScore, MAX(a.Score) AS HighestAnswerScore FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id GROUP BY q.Id) AS Scores
Percentage of Questions Upvoted Lower than the Highest Upvoted Answer.
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) 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 ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE VoteTypes ( Id number, Name 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 PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description 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 FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) 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 PostTags ( PostId number, TagId number ) 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 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 Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId 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 PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress 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 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 MIN(year) FROM table_2380212_1 WHERE avg_attendance = 789
When was the average attendance 789?
CREATE TABLE table_2380212_1 (year INTEGER, avg_attendance VARCHAR)
SELECT no FROM table_24625467_1 WHERE production_code = "2J5352"
What episode number has 2j5352 as a production code?
CREATE TABLE table_24625467_1 (no VARCHAR, production_code VARCHAR)
SELECT Fate, COUNT(Fate) FROM mission GROUP BY Fate ORDER BY COUNT(Fate)
What is the total number of each fate? Give me the result in a bar graph, and could you order Y-axis from low to high order?
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text )
SELECT fg_fga FROM table_23817012_6 WHERE ft_fta = "16-21"
what is the score in fg-fga if in ft-fta is 16-21
CREATE TABLE table_23817012_6 (fg_fga VARCHAR, ft_fta VARCHAR)
SELECT original_air_date FROM table_24625467_1 WHERE production_code = "2J5356"
What date did the episode with a production code of 2j5356 originally air?
CREATE TABLE table_24625467_1 (original_air_date VARCHAR, production_code VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2162" AND procedures.short_title = "Left heart cardiac cath"
How many patients are admitted before the year 2162 with procedure left heart cardiac cath?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT COUNT(gp_gs) FROM table_23817012_6 WHERE ft_pct = ".667"
in the ft pct .667 what is the number of gp-gs
CREATE TABLE table_23817012_6 (gp_gs VARCHAR, ft_pct VARCHAR)
SELECT winning_boat FROM table_24673710_1 WHERE year = 2012
When 2012 is the year what is the winning boat?
CREATE TABLE table_24673710_1 (winning_boat VARCHAR, year VARCHAR)
SELECT "Outcome" FROM table_24244 WHERE "Opponents" = 'Bill Tilden Florence Ballin'
What were the outcomes of matches with bill tilden florence ballin as opponents?
CREATE TABLE table_24244 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
SELECT team__number1 FROM table_23812628_1 WHERE team__number2 = "San Lorenzo"
Name the team number 1 for san lorenzo
CREATE TABLE table_23812628_1 (team__number1 VARCHAR, team__number2 VARCHAR)
SELECT winning_boat FROM table_24673710_1 WHERE entries = 64
When 64 is the entries what is the winning boat?
CREATE TABLE table_24673710_1 (winning_boat VARCHAR, entries VARCHAR)
SELECT AVG("Points") FROM table_75362 WHERE "Score" = '4–1' AND "Record" = '18–10–8–1' AND "January" > '2'
Which Points have a Score of 4 1, and a Record of 18 10 8 1, and a January larger than 2?
CREATE TABLE table_75362 ( "Game" real, "January" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
SELECT team__number2 FROM table_23812628_1 WHERE team__number1 = "River Plate"
Name the team #2 for river plate
CREATE TABLE table_23812628_1 (team__number2 VARCHAR, team__number1 VARCHAR)
SELECT winning_boat FROM table_24673710_1 WHERE entries = 61
When 61 is the entries what is the winning boat?
CREATE TABLE table_24673710_1 (winning_boat VARCHAR, entries VARCHAR)
SELECT "Date of Birth (Age)" FROM table_37218 WHERE "Club/province" = 'ulster' AND "Position" = 'centre'
What is the date of birth for the player from Ulster and plays at Centre position?
CREATE TABLE table_37218 ( "Player" text, "Position" text, "Date of Birth (Age)" text, "Caps" real, "Club/province" text )
SELECT points FROM table_23812628_1 WHERE team__number1 = "Zamora"
Name the points for zamora
CREATE TABLE table_23812628_1 (points VARCHAR, team__number1 VARCHAR)
SELECT title FROM table_2468961_2 WHERE original_air_date = "October 18, 1991"
What is the name of the episode that aired originally on October 18, 1991?
CREATE TABLE table_2468961_2 (title VARCHAR, original_air_date VARCHAR)
SELECT MAX("Rank") FROM table_32614 WHERE "Player" = 'christy heffernan' AND "Matches" > '4'
What is the highest rank for championships with christy heffernan with over 4 matches?
CREATE TABLE table_32614 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Matches" real, "Average" real )
SELECT 2 AS nd_leg FROM table_23812628_1 WHERE team__number1 = "Boca Juniors"
Name the 2nd leg for boca juniors
CREATE TABLE table_23812628_1 (team__number1 VARCHAR)
SELECT title FROM table_2468961_2 WHERE written_by = "Ross Brown"
What is the name of the episode written by Ross Brown?
CREATE TABLE table_2468961_2 (title VARCHAR, written_by VARCHAR)
SELECT * FROM table_train_40 WHERE intention_to_central_venous_catheter = 0
any absolute contraindication to central venous catheterization
CREATE TABLE table_train_40 ( "id" int, "bone_marrow_transplant" bool, "organ_transplantation" bool, "systolic_blood_pressure_sbp" int, "do_not_resuscitate_dnr" bool, "autoimmune_disease" bool, "steroid_therapy" bool, "intention_to_central_venous_catheter" bool, "hematologic_disease" bool, "sepsis" bool, "acute_leukemia" bool, "allergy_to_ifn_gamma" bool, "neoplasma" bool, "receiving_prednisolone" int, "septic_shock" bool, "lactate" int, "NOUSE" float )
SELECT media_type FROM table_23829490_1 WHERE genre = "Psychedelic Trance"
What is every media type for the Psychedelic Trance genre?
CREATE TABLE table_23829490_1 (media_type VARCHAR, genre VARCHAR)
SELECT MIN(no_in_series) FROM table_2468961_2 WHERE original_air_date = "February 28, 1992"
What episode number in the series originally aired on February 28, 1992?
CREATE TABLE table_2468961_2 (no_in_series INTEGER, original_air_date VARCHAR)
SELECT Id, Score, Title FROM Posts WHERE Tags LIKE '%<row>%' AND ClosedDate IS NULL AND Score < 0 ORDER BY Score
Downvoted questions in the [row] tag.
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId 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 FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE 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 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 ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( 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 ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment 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 Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) 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 PostTags ( PostId number, TagId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( 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 PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number )
SELECT composer FROM table_23829490_1 WHERE name_of_the_media = "Hall Of Dreams"
Who is every composer for the media named Hall of Dreams?
CREATE TABLE table_23829490_1 (composer VARCHAR, name_of_the_media VARCHAR)
SELECT original_air_date FROM table_2468961_2 WHERE production_code = 447004
What date did the episode with a production code of 447004 originally air?
CREATE TABLE table_2468961_2 (original_air_date VARCHAR, production_code VARCHAR)
SELECT MIN("Touchdowns") FROM table_1040
What is the least amount of touchdowns scored on the chart?
CREATE TABLE table_1040 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
SELECT media_type FROM table_23829490_1 WHERE genre = "Dub"
What is every media type for the Dub genre?
CREATE TABLE table_23829490_1 (media_type VARCHAR, genre VARCHAR)
SELECT COUNT(no_in_series) FROM table_2468961_2 WHERE written_by = "Ross Brown"
How many episodes were written by Ross brown?
CREATE TABLE table_2468961_2 (no_in_series VARCHAR, written_by VARCHAR)
SELECT SUM(q.ViewCount) AS views, q.Id AS "post_link", a.Score FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE a.OwnerUserId = '##userid##' HAVING SUM(q.ViewCount) > 1000 ORDER BY views DESC
My answers in POPULAR QUESTIONS.
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress 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 VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) 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 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 PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) 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 PostTags ( PostId number, TagId 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 ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) 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 ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId 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 PostHistoryTypes ( Id number, Name 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 SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange 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 ReviewTaskStates ( 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 PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text )
SELECT media_type FROM table_23829490_1 WHERE genre = "World"
What is every media type for the World genre?
CREATE TABLE table_23829490_1 (media_type VARCHAR, genre VARCHAR)
SELECT MAX(no_in_series) FROM table_2468961_3 WHERE no_in_season = 2
What number in the series was episode 2 in the season?
CREATE TABLE table_2468961_3 (no_in_series INTEGER, no_in_season VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE" AND demographic.age < "41"
what is the number of patients whose discharge location is home health care and age is less than 41?
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 ) 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 )
SELECT composition_name FROM table_23829490_1 WHERE music_library = "Heart of Asia" AND media_type = "Album" AND genre = "Trance"
What is every composition name when the music library is Heart of Asia and media type is album with the Trance genre?
CREATE TABLE table_23829490_1 (composition_name VARCHAR, genre VARCHAR, music_library VARCHAR, media_type VARCHAR)
SELECT title FROM table_2468961_3 WHERE written_by = "Bob Rosenfarb" AND directed_by = "Richard Correll"
What was the title of the episode written by Bob Rosenfarb and directed by Richard Correll?
CREATE TABLE table_2468961_3 (title VARCHAR, written_by VARCHAR, directed_by VARCHAR)
SELECT "Winning score" FROM table_39386 WHERE "Year" = '1956'
What is the Winning score in 1956?
CREATE TABLE table_39386 ( "Year" real, "Championship" text, "54 holes" text, "Winning score" text, "Margin" text, "Runner(s)-up" text )
SELECT brooklyn FROM table_23837321_4 WHERE manhattan = "15.5_percentage"
what percentage is brooklyn when manhattan is 15.5%?
CREATE TABLE table_23837321_4 (brooklyn VARCHAR, manhattan VARCHAR)
SELECT university FROM table_24697604_1 WHERE year_founded = 1898
What university was founded in 1898?
CREATE TABLE table_24697604_1 (university VARCHAR, year_founded VARCHAR)
SELECT MIN("Games") FROM table_43055 WHERE "Name" = 'terrell mcintyre' AND "Rank" > '2'
How many Games for Rank 2 Terrell McIntyre?
CREATE TABLE table_43055 ( "Rank" real, "Name" text, "Team" text, "Games" real, "Assists" real )
SELECT qld_cup_premierships FROM table_2383498_4 WHERE home_ground = "Dairy Farmers Stadium"
What is every entry in the QLD Cup Premierships when home ground is Dairy Farmers Stadium?
CREATE TABLE table_2383498_4 (qld_cup_premierships VARCHAR, home_ground VARCHAR)
SELECT MAX(average) FROM table_2472711_32 WHERE total = 221902
What is the maximum average associated with a total of 221902?
CREATE TABLE table_2472711_32 (average INTEGER, total VARCHAR)
SELECT finish FROM table_name_94 WHERE total > 284 AND to_par = "+5" AND player = "nick faldo"
In what place did Nick Faldo, who had more than 284 points and a to par score of +5, finish?
CREATE TABLE table_name_94 ( finish VARCHAR, player VARCHAR, total VARCHAR, to_par VARCHAR )
SELECT first_year_in_qld_cup FROM table_2383498_4 WHERE home_ground = "Corbett Park, Crosby Park, Lang Park, ANZ Stadium"
What is every value for first year in QLD Cup if home ground is Corbett Park, Crosby Park, Lang Park, ANZ Stadium?
CREATE TABLE table_2383498_4 (first_year_in_qld_cup VARCHAR, home_ground VARCHAR)
SELECT COUNT(hosted) FROM table_2472711_32 WHERE highest = 42659
How many values of hosted have a highest value of 42659?
CREATE TABLE table_2472711_32 (hosted VARCHAR, highest VARCHAR)
SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1
Find the id of the candidate who got the lowest oppose rate.
CREATE TABLE candidate ( Candidate_ID VARCHAR, oppose_rate VARCHAR )
SELECT home_ground FROM table_2383498_4 WHERE team = "Sunshine Coast Falcons"
What is the home ground if team is Sunshine Coast Falcons?
CREATE TABLE table_2383498_4 (home_ground VARCHAR, team VARCHAR)
SELECT COUNT(up_down) FROM table_2472711_32 WHERE total = 301470
How many values of up/down have a total value of exactly 301470?
CREATE TABLE table_2472711_32 (up_down VARCHAR, total VARCHAR)
SELECT fault_short_name, COUNT(fault_short_name) FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY skill_description, fault_short_name ORDER BY fault_short_name
A stacked bar chart showing the number of faults for different fault short name and skills required to fix them The x-axis is falut short name and group by skill description, and order in ascending by the X.
CREATE TABLE Part_Faults ( part_fault_id INTEGER, part_id INTEGER, fault_short_name VARCHAR(20), fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Staff ( staff_id INTEGER, staff_name VARCHAR(255), gender VARCHAR(1), other_staff_details VARCHAR(255) ) CREATE TABLE Assets ( asset_id INTEGER, maintenance_contract_id INTEGER, supplier_company_id INTEGER, asset_details VARCHAR(255), asset_make VARCHAR(20), asset_model VARCHAR(20), asset_acquired_date DATETIME, asset_disposed_date DATETIME, other_asset_details VARCHAR(255) ) CREATE TABLE Parts ( part_id INTEGER, part_name VARCHAR(255), chargeable_yn VARCHAR(1), chargeable_amount VARCHAR(20), other_part_details VARCHAR(255) ) CREATE TABLE Fault_Log_Parts ( fault_log_entry_id INTEGER, part_fault_id INTEGER, fault_status VARCHAR(10) ) CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Third_Party_Companies ( company_id INTEGER, company_type VARCHAR(5), company_name VARCHAR(255), company_address VARCHAR(255), other_company_details VARCHAR(255) ) CREATE TABLE Fault_Log ( fault_log_entry_id INTEGER, asset_id INTEGER, recorded_by_staff_id INTEGER, fault_log_entry_datetime DATETIME, fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Asset_Parts ( asset_id INTEGER, part_id INTEGER ) CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CREATE TABLE Engineer_Visits ( engineer_visit_id INTEGER, contact_staff_id INTEGER, engineer_id INTEGER, fault_log_entry_id INTEGER, fault_status VARCHAR(10), visit_start_datetime DATETIME, visit_end_datetime DATETIME, other_visit_details VARCHAR(255) ) CREATE TABLE Skills ( skill_id INTEGER, skill_code VARCHAR(20), skill_description VARCHAR(255) ) CREATE TABLE Skills_Required_To_Fix ( part_fault_id INTEGER, skill_id INTEGER ) CREATE TABLE Engineer_Skills ( engineer_id INTEGER, skill_id INTEGER )
SELECT qld_cup_premierships FROM table_2383498_4 WHERE team = "Gold Coast Vikings"
What is the QLD Cup Premierships if team is Gold Coast Vikings?
CREATE TABLE table_2383498_4 (qld_cup_premierships VARCHAR, team VARCHAR)
SELECT up_down FROM table_2472711_32 WHERE venue = "Subiaco Oval"
What is the up/down associated with the Subiaco Oval?
CREATE TABLE table_2472711_32 (up_down VARCHAR, venue VARCHAR)
SELECT transcription FROM table_180802_3 WHERE sanskrit_word = "Chandra"
What is the transcription of the sanskrit word chandra?
CREATE TABLE table_180802_3 ( transcription VARCHAR, sanskrit_word VARCHAR )
SELECT team FROM table_2383498_4 WHERE location = "Port Moresby"
What is every team in the location of Port Moresby?
CREATE TABLE table_2383498_4 (team VARCHAR, location VARCHAR)
SELECT team FROM table_24765815_1 WHERE rank = "7th"
What team was ranked in 7th?
CREATE TABLE table_24765815_1 (team VARCHAR, rank VARCHAR)
SELECT mintage__bu_ AS "_clarification_needed_" FROM table_11916083_1 WHERE artist = "Royal Canadian Mint Staff" AND issue_price__proof_ = "$54.95"
What is the mintage (bu) with the artist Royal Canadian Mint Staff and has an issue price (proof) of $54.95?
CREATE TABLE table_11916083_1 ( mintage__bu_ VARCHAR, _clarification_needed_ VARCHAR, artist VARCHAR, issue_price__proof_ VARCHAR )
SELECT COUNT(last_year_in_qld_cup) FROM table_2383498_4 WHERE qld_cup_premierships = "1996, 2001"
How many values of last year in QLD Cup if QLD Cup Premierships is 1996, 2001?
CREATE TABLE table_2383498_4 (last_year_in_qld_cup VARCHAR, qld_cup_premierships VARCHAR)
SELECT player FROM table_24765815_1 WHERE opponent = "Blackburn Rovers"
Which player had an opponent of Blackburn Rovers?
CREATE TABLE table_24765815_1 (player VARCHAR, opponent VARCHAR)
SELECT date, COUNT(date) FROM weather ORDER BY COUNT(date) DESC
I want a bar chart to show the frequency of the dates that have the 5 highest cloud cover rates each day, and could you sort in descending by the Y-axis?
CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, mean_dew_point_f INTEGER, min_dew_point_f INTEGER, max_humidity INTEGER, mean_humidity INTEGER, min_humidity INTEGER, max_sea_level_pressure_inches NUMERIC, mean_sea_level_pressure_inches NUMERIC, min_sea_level_pressure_inches NUMERIC, max_visibility_miles INTEGER, mean_visibility_miles INTEGER, min_visibility_miles INTEGER, max_wind_Speed_mph INTEGER, mean_wind_speed_mph INTEGER, max_gust_speed_mph INTEGER, precipitation_inches INTEGER, cloud_cover INTEGER, events TEXT, wind_dir_degrees INTEGER, zip_code INTEGER ) CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT )
SELECT undisclosed FROM table_23835213_2 WHERE adam_hinshelwood = "Ricky Newman"
What are the undisclosed when Adam Hinshelwood is Ricky Newman?
CREATE TABLE table_23835213_2 (undisclosed VARCHAR, adam_hinshelwood VARCHAR)
SELECT score FROM table_24765815_1 WHERE rank = "1st"
What was the score for the 1st ranked team?
CREATE TABLE table_24765815_1 (score VARCHAR, rank VARCHAR)
SELECT COUNT(UniqueId), WeekStart FROM (SELECT Posts.Id AS UniqueId, DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS WeekStart FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.Id = PostTags.PostId WHERE Tags.TagName = @Tag AND (Posts.Body LIKE @Searchstring OR Posts.Title LIKE @Searchstring) AND Posts.PostTypeId = 1) AS RelevantQuestionsByWeek GROUP BY WeekStart
Trend for relevant questions (Tag and Searchstring).
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) 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 ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) 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 PostTypes ( Id number, Name text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, 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 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 PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE 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 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 )
SELECT df FROM table_23835213_2 WHERE adam_hinshelwood = "Junior Mendes"
What is the df when Adam Hinshelwood is Junior Mendes?
CREATE TABLE table_23835213_2 (df VARCHAR, adam_hinshelwood VARCHAR)
SELECT player FROM table_24765815_1 WHERE vote_percentage = "7.85%"
What was the name of the player that had a vote percentage of 7.85%?
CREATE TABLE table_24765815_1 (player VARCHAR, vote_percentage VARCHAR)