instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What college or club did the round 9 draft pick from Canada come from?
CREATE TABLE table_37976 ("Round" real,"Player" text,"Position" text,"Nationality" text,"College/Junior/Club Team (League)" text)
SELECT "College/Junior/Club Team (League)" FROM table_37976 WHERE "Round" = '9' AND "Nationality" = 'canada'
What is the Country of the Player with a To par of +4 and Score of 73-71-73=217?
CREATE TABLE table_50353 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Country" FROM table_50353 WHERE "To par" = '+4' AND "Score" = '73-71-73=217'
Which number is ?
CREATE TABLE table_58988 ("Standard order" real,"English translation" text,"Transcription (based on Pinyin)" text,"Traditional Chinese" text,"Simplified Chinese" text)
SELECT "Standard order" FROM table_58988 WHERE "Traditional Chinese" = '國殤'
Show different carriers of phones together with the number of phones with each carrier by a bar chart.
CREATE TABLE phone (Name text,Phone_ID int,Memory_in_G int,Carrier text,Price real)CREATE TABLE market (Market_ID int,District text,Num_of_employees int,Num_of_shops real,Ranking int)CREATE TABLE phone_market (Market_ID int,Phone_ID text,Num_of_stock int)
SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier
Who was the opponent team on September 30, 1990?
CREATE TABLE table_11800 ("Week" text,"Date" text,"Opponent" text,"Result" text,"Kickoff [a ]" text,"Game site" text,"Attendance" text,"Record" text)
SELECT "Opponent" FROM table_11800 WHERE "Date" = 'september 30, 1990'
what is religion and insurance of subject name kelly gallardo?
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 lab (subject_id text,hadm_id text,itemid text,charttime te...
SELECT demographic.religion, demographic.insurance FROM demographic WHERE demographic.name = "Kelly Gallardo"
Which season premiered on November 27, 2012?
CREATE TABLE table_58434 ("Season" text,"Season premiere" text,"Season finale" text,"TV season" text,"Ranking" text,"Viewers (in millions)" real)
SELECT "Season" FROM table_58434 WHERE "Season premiere" = 'november 27, 2012'
is the heart rate of patient 23475 measured at 2105-06-29 16:00:00 greater than measured at 2105-06-29 15:00:00?
CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto 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...
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23475)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'h...
Users with the most community wiki posts.
CREATE TABLE FlagTypes (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 Po...
SELECT COUNT(Id), OwnerUserId AS "user_link" FROM Posts WHERE NOT CommunityOwnedDate IS NULL GROUP BY OwnerUserId ORDER BY COUNT(Id) DESC
What driver has a grid of under 10, and under 70 laps?
CREATE TABLE table_11570 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT "Driver" FROM table_11570 WHERE "Grid" < '10' AND "Laps" < '70'
Average view count for specific tag.
CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE Comment...
SELECT Tags.TagName, AVG(CAST(ViewCount AS INT)) AS AverageViewCount, COUNT(Posts.Id) AS QuestionCount FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId JOIN Posts ON PostTags.PostId = Posts.Id WHERE NOT AcceptedAnswerId IS NULL AND Tags.TagName = '##TagName##' GROUP BY Tags.TagName ORDER BY AverageViewCount DESC
What was the Venue of the San Francisco 49ers Home game with a Result of 30-10?
CREATE TABLE table_78678 ("Year" real,"Date" text,"Home Team" text,"Result" text,"Visiting Team" text,"Venue" text)
SELECT "Venue" FROM table_78678 WHERE "Home Team" = 'san francisco 49ers' AND "Result" = '30-10'
how many patients are diagnosed with the primary disease st elevated myocardial infarction or cardiac cath and had the lab test for abnormal status?
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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" AND lab.flag = "abnormal"
What tournament had a Score of 6 3, 2 6, [10 8]?
CREATE TABLE table_name_90 (tournament VARCHAR,score VARCHAR)
SELECT tournament FROM table_name_90 WHERE score = "6–3, 2–6, [10–8]"
On what day did tommy ellis drive?
CREATE TABLE table_30358 ("Year" real,"Date" text,"Driver" text,"Team" text,"Manufacturer" text,"Laps" text,"Miles (km)" text,"Race Time" text,"Average Speed (mph)" text)
SELECT "Date" FROM table_30358 WHERE "Driver" = 'Tommy Ellis'
Count the number of patients less than 43 years of age who had a total protein body fluid lab test.
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "43" AND lab.label = "Total Protein, Body Fluid"
What was the record on May 21?
CREATE TABLE table_name_15 (record VARCHAR,date VARCHAR)
SELECT record FROM table_name_15 WHERE date = "may 21"
What is the name of the district with the smallest area?
CREATE TABLE store_district (store_id number,district_id number)CREATE TABLE store (store_id number,store_name text,type text,area_size number,number_of_product_category number,ranking number)CREATE TABLE product (product_id number,product text,dimensions text,dpi number,pages_per_minute_color number,max_page_size text...
SELECT district_name FROM district ORDER BY city_area LIMIT 1
I want the time/retired for Grid of 13
CREATE TABLE table_name_59 (time_retired VARCHAR,grid VARCHAR)
SELECT time_retired FROM table_name_59 WHERE grid = 13
what's the result with first elected being 1922
CREATE TABLE table_18674 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "Result" FROM table_18674 WHERE "First elected" = '1922'
What are the memories and carriers of phones?
CREATE TABLE market (market_id number,district text,num_of_employees number,num_of_shops number,ranking number)CREATE TABLE phone (name text,phone_id number,memory_in_g number,carrier text,price number)CREATE TABLE phone_market (market_id number,phone_id text,num_of_stock number)
SELECT memory_in_g, carrier FROM phone
What Class has a Quantity made of 5?
CREATE TABLE table_68986 ("Class" text,"Type" text,"Fleet numbers" text,"Quantity made" real,"Manufacturer" text,"Date made" text,"Date withdrawn" text)
SELECT "Class" FROM table_68986 WHERE "Quantity made" = '5'
which party had the highest number of house members in 2000 ?
CREATE TABLE table_202_157 (id number,"affiliation" text,"house members\n2000 election\nresults" number,"house members\nat dissolution" number,"senate members\non election\nday 2000" number,"senate members\nat dissolution" number)
SELECT "affiliation" FROM table_202_157 ORDER BY "house members\n2000 election\nresults" DESC LIMIT 1
What was the margin of victory when Mark Calcavecchia was the runner-up?
CREATE TABLE table_name_53 (margin_of_victory VARCHAR,runner_s__up VARCHAR)
SELECT margin_of_victory FROM table_name_53 WHERE runner_s__up = "mark calcavecchia"
What's the name of the central bank in the country where Colombian Peso (cop) is the local currency?
CREATE TABLE table_17540 ("Country" text,"Currency" text,"1 Euro =" text,"1 USD =" text,"Central bank" text)
SELECT "Central bank" FROM table_17540 WHERE "Currency" = 'Colombian peso (COP)'
What is the nationality with a lane larger than 1, and a rank larger than 5, for Hsu Chi-Chieh?
CREATE TABLE table_name_24 (nationality VARCHAR,name VARCHAR,lane VARCHAR,rank VARCHAR)
SELECT nationality FROM table_name_24 WHERE lane > 1 AND rank > 5 AND name = "hsu chi-chieh"
All answers by a specific user.
CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescr...
SELECT Id AS "post_link", Score FROM Posts WHERE (PostTypeId = 2) AND (OwnerUserId = '##userid##') ORDER BY Id
WHich Tries has a Team of pau and Points against larger than 103?
CREATE TABLE table_42080 ("Team" text,"Tries for" real,"Tries against" real,"Try diff" text,"Points for" real,"Points against" real,"Points diff" text)
SELECT MIN("Tries for") FROM table_42080 WHERE "Team" = 'pau' AND "Points against" > '103'
Answer score badge acquisition for users with just one Nice-and-Great answer.
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 PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteT...
SELECT U.Id AS "user_link" FROM Users AS U INNER JOIN Posts AS A ON A.OwnerUserId = U.Id INNER JOIN PostTags AS PT ON PT.PostId = A.Id INNER JOIN Tags AS T ON T.Id = PT.TagId INNER JOIN (SELECT OwnerUserId, MAX(Score) AS MaxScore FROM Posts WHERE PostTypeId = 2 AND Score >= 10 GROUP BY OwnerUserId) AS AC ON AC.OwnerUse...
Who was the Opponent in the Auckland, New Zealand Tournament?
CREATE TABLE table_name_50 (opponent VARCHAR,tournament VARCHAR)
SELECT opponent FROM table_name_50 WHERE tournament = "auckland, new zealand"
What kind of Episode Number has a Air Date on 29 june 2007?
CREATE TABLE table_name_41 (episode_number INTEGER,air_date VARCHAR)
SELECT AVG(episode_number) FROM table_name_41 WHERE air_date = "29 june 2007"
How many Games have a Drawn smaller than 1, and a Lost larger than 4?
CREATE TABLE table_34107 ("Games" real,"Drawn" real,"Lost" real,"Points difference" text,"Points" real)
SELECT COUNT("Games") FROM table_34107 WHERE "Drawn" < '1' AND "Lost" > '4'
top 200,000 posts by viewcount.
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,DeactivationDat...
SELECT * FROM Posts ORDER BY Posts.ViewCount DESC LIMIT 200000
How many values for winnings correspond to average start of 19.0?
CREATE TABLE table_2597876_2 (winnings VARCHAR,avg_start VARCHAR)
SELECT COUNT(winnings) FROM table_2597876_2 WHERE avg_start = "19.0"
Who is the Opponents on May 3, 1982?
CREATE TABLE table_61221 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text)
SELECT "Opponents" FROM table_61221 WHERE "Date" = 'may 3, 1982'
If the enrollment is 3584, what's the largest founded?
CREATE TABLE table_17220 ("Institution" text,"Location" text,"Founded" real,"Type" text,"Enrollment" real,"Nickname" text,"Joined" real)
SELECT MAX("Founded") FROM table_17220 WHERE "Enrollment" = '3584'
Which player is from Queens, NY?
CREATE TABLE table_52098 ("Year" text,"Player" text,"School" text,"Hometown" text,"College" text)
SELECT "Player" FROM table_52098 WHERE "Hometown" = 'queens, ny'
how many patients have been diagnosed with short title norml pressure hydroceph anfd have had a urine lab test?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Norml pressure hydroceph" AND lab.fluid = "Urine"
what is the total points scored in the second round by all teams ?
CREATE TABLE table_204_405 (id number,"team 1" text,"agg." text,"team 2" text,"1st leg" text,"2nd leg" text)
SELECT SUM("2nd leg" + "2nd leg") FROM table_204_405
Assignment 1 - Step 8: Data File 5.
CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE ...
SELECT * FROM Posts WHERE Posts.ViewCount > 24231 AND Posts.ViewCount < 30580
Who is the player had the highest salary in 2015?
CREATE TABLE hall_of_fame (player_id text,yearid number,votedby text,ballots text,needed text,votes text,inducted text,category text,needed_note text)CREATE TABLE salary (year number,team_id text,league_id text,player_id text,salary number)CREATE TABLE player (player_id text,birth_year text,birth_month text,birth_day t...
SELECT player_id FROM salary WHERE year = "2015" ORDER BY salary DESC LIMIT 1
Name the final place for july 25, 2009
CREATE TABLE table_23819979_3 (final_place VARCHAR,last_match VARCHAR)
SELECT final_place FROM table_23819979_3 WHERE last_match = "July 25, 2009"
What is the result against everton?
CREATE TABLE table_12001 ("Round" text,"Date" text,"Opponent" text,"Venue" text,"Result" text,"Attendance" real)
SELECT "Result" FROM table_12001 WHERE "Opponent" = 'everton'
In what year did the team of aston martin racing have a position of 6th?
CREATE TABLE table_name_35 (year VARCHAR,team VARCHAR,pos VARCHAR)
SELECT COUNT(year) FROM table_name_35 WHERE team = "aston martin racing" AND pos = "6th"
What is the lowest CDR that has 112 as the difference?
CREATE TABLE table_59306 ("Periodo" text,"Births" real,"Deaths" real,"Difference" real,"CBR*" real,"CDR*" real,"IMR*" real,"TFR*" real)
SELECT MIN("CDR*") FROM table_59306 WHERE "Difference" = '112'
How many nationalities does athlete Casey Jacobsen have?
CREATE TABLE table_16494599_10 (nationality VARCHAR,player VARCHAR)
SELECT COUNT(nationality) FROM table_16494599_10 WHERE player = "Casey Jacobsen"
How many total viewers for 'the summer house'?
CREATE TABLE table_54635 ("Episode" text,"Air Date" text,"Timeslot (EST)" text,"Rating" real,"Share" text,"18\u201349 Rating" text,"Viewers (millions)" real,"Rank" text)
SELECT SUM("Viewers (millions)") FROM table_54635 WHERE "Episode" = 'the summer house'
Tell me the total number of grid for laps of 52
CREATE TABLE table_name_60 (grid VARCHAR,laps VARCHAR)
SELECT COUNT(grid) FROM table_name_60 WHERE laps = 52
what election had the most total votes ?
CREATE TABLE table_204_690 (id number,"election" number,"party name" text,"total votes" number,"share of votes" text,"seats" number,"share of seats" text,"party leader(s)" text,"notes" text)
SELECT "election" FROM table_204_690 ORDER BY "total votes" DESC LIMIT 1
Who manufactures Makoto Tamada's vehicle?
CREATE TABLE table_45610 ("Rider" text,"Manufacturer" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT "Manufacturer" FROM table_45610 WHERE "Rider" = 'makoto tamada'
what is the position for robert johnson?
CREATE TABLE table_68847 ("Round" real,"Name" text,"Position" text,"School" text,"Signed" text)
SELECT "Position" FROM table_68847 WHERE "Name" = 'robert johnson'
How many times was tues 24 aug 19' 19.83 117.110mph?
CREATE TABLE table_29183 ("Rank" real,"Rider" text,"Sat 21 Aug" text,"Mon 23 Aug" text,"Tues 24 Aug" text,"Wed 25 Aug" text,"Thurs 26 Aug" text,"Fri 27 Aug" text,"Sat 29 Aug" text)
SELECT COUNT("Rank") FROM table_29183 WHERE "Tues 24 Aug" = '19'' 19.83 117.110mph'
which flights are between BOSTON and BALTIMORE WASHINGTON
CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE airport (airport_code varchar,a...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight WHERE ((flight.to_airport = AIRPORT_SERVICE_1.airport_code AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND...
If the 2011 population is 3685681, what is the name of the headquarters?
CREATE TABLE table_2168295_1 (headquarters VARCHAR,population__2011_ VARCHAR)
SELECT headquarters FROM table_2168295_1 WHERE population__2011_ = 3685681
For the ship that was a brig and located in the English Channel, what was the disposition of ship?
CREATE TABLE table_78964 ("Date" text,"Ship Name" text,"Tonnage" text,"Ship Type" text,"Location" text,"Disposition of Ship" text)
SELECT "Disposition of Ship" FROM table_78964 WHERE "Ship Type" = 'brig' AND "Location" = 'english channel'
How many draws occurred when 25 points were scored?
CREATE TABLE table_22447 ("Position" real,"Team" text,"Played" real,"Wins" real,"Draws" real,"Losses" real,"Scored" real,"Conceded" real,"Points" real)
SELECT COUNT("Draws") FROM table_22447 WHERE "Scored" = '25'
On episodes where guest 1 is Jim White, who was guest 3?
CREATE TABLE table_20466963_9 (guest_3 VARCHAR,guest_1 VARCHAR)
SELECT guest_3 FROM table_20466963_9 WHERE guest_1 = "Jim White"
how many russians lived in south ossetia in 1970 ?
CREATE TABLE table_204_257 (id number,"ethnicity" text,"1926 census" text,"1939 census" text,"1959 census" text,"1970 census" text,"1979 census" text,"1989 census" text,"2007 estimate" text)
SELECT "1970 census" FROM table_204_257 WHERE "ethnicity" = 'russians'
What is the Release Date for Model Number c7 1.8?
CREATE TABLE table_name_62 (release_date VARCHAR,model_number VARCHAR)
SELECT release_date FROM table_name_62 WHERE model_number = "c7 1.8"
What is the report corresponding to the game that had the Townsville Crocodiles as home team?
CREATE TABLE table_47218 ("Date" text,"Home team" text,"Score" text,"Away team" text,"Venue" text,"Box Score" text,"Report" text)
SELECT "Report" FROM table_47218 WHERE "Home team" = 'townsville crocodiles'
how many number of stages in the tour de france contain stages with mountains ?
CREATE TABLE table_204_312 (id number,"stage" text,"date" text,"route" text,"terrain" text,"length" text,"winner" text)
SELECT COUNT("stage") FROM table_204_312 WHERE "terrain" = 'stage with mountain(s)'
What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?
CREATE TABLE store (store_id number,manager_staff_id number,address_id number,last_update time)CREATE TABLE film_text (film_id number,title text,description text)CREATE TABLE film_category (film_id number,category_id number,last_update time)CREATE TABLE film_actor (actor_id number,film_id number,last_update time)CREATE...
SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01')
when is the first procedure time of patient 74624 in 2105?
CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 d_labitems (row_id number,itemid number,labe...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 74624) AND STRFTIME('%y', procedures_icd.charttime) = '2105' ORDER BY procedures_icd.charttime LIMIT 1
Show the number of apartment bookings in each weekday and bin booking start date by weekday with a bar chart, show how many booking start date in ascending order.
CREATE TABLE Apartment_Facilities (apt_id INTEGER,facility_code CHAR(15))CREATE TABLE Apartment_Buildings (building_id INTEGER,building_short_name CHAR(15),building_full_name VARCHAR(80),building_description VARCHAR(255),building_address VARCHAR(255),building_manager VARCHAR(50),building_phone VARCHAR(80))CREATE TABLE ...
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings ORDER BY COUNT(booking_start_date)
what is the combined result on 9/28 ?
CREATE TABLE table_204_157 (id number,"date" text,"opponent#" text,"rank#" text,"site" text,"result" text)
SELECT "result" FROM table_204_157 WHERE "date" = '09/28/1946'
Who is the independent regional force when democratic coalition is (r) jorge tarud ( ppd )?
CREATE TABLE table_28764 ("Dist." real,"Democratic Coalition" text,"Alliance" text,"Together We Can Do More" text,"Independent Regional Force" text,"Independents" text)
SELECT "Independent Regional Force" FROM table_28764 WHERE "Democratic Coalition" = '(R) Jorge Tarud ( PPD )'
What was the record at the game attended by 10,389?
CREATE TABLE table_name_48 (record VARCHAR,attendance VARCHAR)
SELECT record FROM table_name_48 WHERE attendance = "10,389"
What is the Highest first elected year that has a district of 06.0 6, and a committee of economic matters?
CREATE TABLE table_15823 ("District" text,"Counties Represented" text,"Party" text,"First Elected" real,"Committee" text)
SELECT MAX("First Elected") FROM table_15823 WHERE "District" = '06.0 6' AND "Committee" = 'economic matters'
What is the minimum days of hospital stay of patients whose age is equal or more than 41 years?
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 lab (subject_id text,hadm_id text,itemid text,charttime te...
SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.age >= "41"
Who was Louise when Tracy Venner was Dainty June?
CREATE TABLE table_name_83 (louise VARCHAR,dainty_june VARCHAR)
SELECT louise FROM table_name_83 WHERE dainty_june = "tracy venner"
when was the site listed when the county is cochise?
CREATE TABLE table_name_14 (listed VARCHAR,county VARCHAR)
SELECT listed FROM table_name_14 WHERE county = "cochise"
What Episode has a Rating of 1.8, and Viewers (m) smaller than 2.73?
CREATE TABLE table_61324 ("Episode" text,"18-49" text,"Viewers (m)" real,"Rating" text,"Share" text)
SELECT "Episode" FROM table_61324 WHERE "Rating" = '1.8' AND "Viewers (m)" < '2.73'
Which 2009 tournament was french open?
CREATE TABLE table_name_51 (tournament VARCHAR)
SELECT 2009 FROM table_name_51 WHERE tournament = "french open"
Count the number of people of each sex who have a weight higher than 85, and display x-axis from high to low order.
CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real)CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)
SELECT Sex, COUNT(*) FROM people WHERE Weight > 85 GROUP BY Sex ORDER BY Sex DESC
What date was the Tyre d and Bruce Mclaren won?
CREATE TABLE table_53105 ("Race" text,"Circuit" text,"Date" text,"Pole position" text,"Fastest lap" text,"Winning driver" text,"Constructor" text,"Tyre" text,"Report" text)
SELECT "Date" FROM table_53105 WHERE "Tyre" = 'd' AND "Winning driver" = 'bruce mclaren'
Find the names and descriptions of the photos taken at the tourist attraction called 'film festival'.
CREATE TABLE royal_family (royal_family_id number,royal_family_details text)CREATE TABLE visitors (tourist_id number,tourist_details text)CREATE TABLE ref_hotel_star_ratings (star_rating_code text,star_rating_description text)CREATE TABLE theme_parks (theme_park_id number,theme_park_details text)CREATE TABLE museums (m...
SELECT T1.name, T1.description FROM photos AS T1 JOIN tourist_attractions AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id WHERE T2.name = "film festival"
What was the week 2 prior to the when Brittany Alyse was week 3?
CREATE TABLE table_name_60 (week_2 VARCHAR,week_3 VARCHAR)
SELECT week_2 FROM table_name_60 WHERE week_3 = "brittany alyse"
What was the average amount of losses for teams with played less than 14?
CREATE TABLE table_49509 ("Position" real,"Name" text,"Played" real,"Drawn" real,"Lost" real,"Points" real)
SELECT AVG("Lost") FROM table_49509 WHERE "Played" < '14'
Find questions with a lower-case first character in the title.
CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE ReviewTaskResultTy...
SELECT Title, CONCAT('https://electronics.stackexchange.com/questions/', CAST(Id AS TEXT), '/') AS URL FROM Posts WHERE PostTypeId = 1 AND LEFT(Title, 1) = LOWER(LEFT(Title, 1)) ORDER BY CreationDate DESC
Bar chart x axis meter 500 y axis meter_100, sort y axis in desc order.
CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 te...
SELECT meter_500, meter_100 FROM swimmer ORDER BY meter_100 DESC
how many patients are diagnosed with primary disease coronary artery disease or coronary artery bypass graft myomectomy/sda and tested with blood in lab?
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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT; MYOMECTOMY/SDA" AND lab.fluid = "Blood"
Who directed the episode that aired on September 25, 1967?
CREATE TABLE table_25800134_12 (director VARCHAR,airdate VARCHAR)
SELECT director FROM table_25800134_12 WHERE airdate = "September 25, 1967"
what is the location when the circuit is lowood circuit and the race is lowood trophy?
CREATE TABLE table_name_47 (location VARCHAR,circuit VARCHAR,race VARCHAR)
SELECT location FROM table_name_47 WHERE circuit = "lowood circuit" AND race = "lowood trophy"
evidence of any significant clinical disorder or laboratory finding that renders the participant unsuitable for receiving an investigational new drug including clinically significant or unstable hematologic, hepatic, cardiovascular ( including history of ventricular fibrillation or ventricular tachycardia ) , pulmonary...
CREATE TABLE table_train_124 ("id" int,"loss_of_consciousness" bool,"serum_glucose" bool,"myelosuppression" bool,"retinoids_hepatotoxic" bool,"pulmonary_disease" bool,"etiology" bool,"abnormal_thyroid_function" bool,"laboratory_abnormality" bool,"chest_pain" bool,"dsm_iv_criteria" bool,"neurodegenerative_disease" bool,...
SELECT * FROM table_train_124 WHERE clinical_disorder = 1 OR (investigational_new_drug = 1 OR hematologic_disease = 1 OR hepatic_disease = 1 OR (cardiovascular_disease = 1 OR ventricular_fibrillation = 1 OR ventricular_tachycardia = 1) OR pulmonary_disease = 1 OR gastrointestinal_disease = 1 OR endocrine_disease = 1 OR...
what was the first year where this golfer scored in the top 10 ?
CREATE TABLE table_204_940 (id number,"year" number,"tournaments\nplayed" number,"cuts\nmade" number,"wins" number,"2nd" number,"3rd" number,"top 10s" number,"best\nfinish" text,"earnings\n(\u20ac)" number,"money\nlist rank" number,"scoring\naverage" number,"scoring\nrank" number,"rolex\nranking" number)
SELECT MIN("year") FROM table_204_940 WHERE "top 10s" > 0
Year on year growth by month for a tag.
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,Ans...
SELECT ((YEAR(CURRENT_TIMESTAMP()) - YEAR(P.CreationDate)) * 12 + MONTH(CURRENT_TIMESTAMP()) - MONTH(P.CreationDate)) AS monthsAgo, COUNT(*) FROM Posts AS P INNER JOIN PostTags AS PT ON P.Id = PT.PostId INNER JOIN Tags AS T ON PT.TagId = T.Id WHERE ((YEAR(CURRENT_TIMESTAMP()) - YEAR(P.CreationDate)) * 12 + MONTH(CURREN...
What was the capacity percentage when attendance was 71080?
CREATE TABLE table_28884858_2 (capacity_percentage VARCHAR,average_attendance VARCHAR)
SELECT capacity_percentage FROM table_28884858_2 WHERE average_attendance = 71080
Beginning next semester ; which classes will be taught by Dr. Giorgio Bertellini ?
CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_cre...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Giorgio Bertellini%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructo...
count the number of patients whose diagnoses short title is physical restrain status and drug type is base?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Physical restrain status" AND prescriptions.drug_type = "BASE"
What shows for 1992 when 1988 is A, at the Australian Open?
CREATE TABLE table_name_43 (tournament VARCHAR)
SELECT 1992 FROM table_name_43 WHERE 1988 = "a" AND tournament = "australian open"
What year engine does a ferrari v6 have?
CREATE TABLE table_name_77 (year VARCHAR,engine VARCHAR)
SELECT year FROM table_name_77 WHERE engine = "ferrari v6"
How many lanes have a Time of 53.61, and a Rank larger than 3?
CREATE TABLE table_name_32 (lane INTEGER,time VARCHAR,rank VARCHAR)
SELECT SUM(lane) FROM table_name_32 WHERE time = 53.61 AND rank > 3
Bin the installation date into the day of week interval, and then you can draw a bar chart to tell me how many stations each year, and list Y in desc order.
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 NUM...
SELECT installation_date, COUNT(installation_date) FROM station ORDER BY COUNT(installation_date) DESC
What is the ICAO for the Yangon International Airport?
CREATE TABLE table_name_52 (icao VARCHAR,airport VARCHAR)
SELECT icao FROM table_name_52 WHERE airport = "yangon international airport"
What's the total number of Win % with an Appearances of 4, and Losses that's larger than 3?
CREATE TABLE table_5533 ("Appearances" real,"Team" text,"Wins" real,"Losses" real,"Win %" real)
SELECT COUNT("Win %") FROM table_5533 WHERE "Appearances" = '4' AND "Losses" > '3'
Which Name has a Term end of 18 july 1944?
CREATE TABLE table_name_88 (name VARCHAR,term_end VARCHAR)
SELECT name FROM table_name_88 WHERE term_end = "18 july 1944"
Name the division record for riders
CREATE TABLE table_68072 ("School" text,"Team" text,"Division Record" text,"Overall Record" text,"Season Outcome" text)
SELECT "Division Record" FROM table_68072 WHERE "Team" = 'riders'
Return a bar chart to show how many documents for different budget type code, I want to list from high to low by the bars.
CREATE TABLE Statements (Statement_ID INTEGER,Statement_Details VARCHAR(255))CREATE TABLE Ref_Budget_Codes (Budget_Type_Code CHAR(15),Budget_Type_Description VARCHAR(255))CREATE TABLE Documents (Document_ID INTEGER,Document_Type_Code CHAR(15),Project_ID INTEGER,Document_Date DATETIME,Document_Name VARCHAR(255),Document...
SELECT T1.Budget_Type_Code, COUNT(T1.Budget_Type_Code) FROM Documents_with_Expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_Code = T2.Budget_Type_Code GROUP BY T1.Budget_Type_Code ORDER BY T1.Budget_Type_Code DESC
Users with the most Favorites.
CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE FlagTypes (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,Ema...
SELECT U.Id AS "user_link", (SELECT COUNT(V.Id) AS "favorites" FROM Votes AS V, VoteTypes AS Vt WHERE Vt.Id = V.VoteTypeId AND U.Id = V.UserId AND Vt.Id = 5) AS "favs" FROM Users AS U WHERE (SELECT COUNT(V.Id) AS "favorites" FROM Votes AS V, VoteTypes AS Vt WHERE Vt.Id = V.VoteTypeId AND U.Id = V.UserId AND Vt.Id = 5) ...
What is Home Team, when Tie no is '27'?
CREATE TABLE table_62247 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text)
SELECT "Home team" FROM table_62247 WHERE "Tie no" = '27'