answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT MIN(first_elected) FROM table_1341663_26
When was the earliest first election?
CREATE TABLE table_1341663_26 (first_elected INTEGER)
SELECT AVG(lat), AVG(long) FROM station WHERE city = "San Jose"
What is the average latitude and longitude of stations located in San Jose city?
CREATE TABLE station (lat INTEGER, long INTEGER, city VARCHAR)
SELECT high_rebounds FROM table_17060277_7 WHERE team = "Memphis"
Name the high rebounds for memphis
CREATE TABLE table_17060277_7 ( high_rebounds VARCHAR, team VARCHAR )
SELECT COUNT(incumbent) FROM table_1341663_26 WHERE candidates = "Dick Gephardt (D) 81.9% Lee Buchschacher (R) 18.1%"
How many times was the candidates dick gephardt (d) 81.9% lee buchschacher (r) 18.1%?
CREATE TABLE table_1341663_26 (incumbent VARCHAR, candidates VARCHAR)
SELECT id FROM trip ORDER BY duration LIMIT 1
What is the id of the trip that has the shortest duration?
CREATE TABLE trip (id VARCHAR, duration VARCHAR)
SELECT date_claim_made FROM claims ORDER BY date_claim_made LIMIT 1
Tell me the the date when the first claim was made.
CREATE TABLE settlements ( settlement_id number, claim_id number, date_claim_made time, date_claim_settled time, amount_claimed number, amount_settled number, customer_policy_id number ) CREATE TABLE customers ( customer_id number, customer_details text ) CREATE TABLE claims ( claim_id number, policy_id number, date_claim_made time, date_claim_settled time, amount_claimed number, amount_settled number ) CREATE TABLE payments ( payment_id number, settlement_id number, payment_method_code text, date_payment_made time, amount_payment number ) CREATE TABLE customer_policies ( policy_id number, customer_id number, policy_type_code text, start_date time, end_date time )
SELECT district FROM table_1341663_33 WHERE incumbent = "S. William Green"
What district did S. William Green belong to?
CREATE TABLE table_1341663_33 (district VARCHAR, incumbent VARCHAR)
SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636
What is the total and maximum duration of trips with bike id 636?
CREATE TABLE trip (duration INTEGER, bike_id VARCHAR)
SELECT "Outgoing manager" FROM table_77878 WHERE "Date of vacancy" = '22 november'
Tell me the outgoing manager for 22 november date of vacancy
CREATE TABLE table_77878 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text )
SELECT district FROM table_1341663_33 WHERE party = "Democratic" AND first_elected = 1974 AND incumbent = "Stephen J. Solarz"
What district did the Democratic party incumbent Stephen J. Solarz get first elected to in 1974?
CREATE TABLE table_1341663_33 (district VARCHAR, incumbent VARCHAR, party VARCHAR, first_elected VARCHAR)
SELECT zip_code, AVG(mean_temperature_f) FROM weather WHERE date LIKE "8/%" GROUP BY zip_code
For each zip code, return the average mean temperature of August there.
CREATE TABLE weather (zip_code VARCHAR, mean_temperature_f INTEGER, date VARCHAR)
SELECT Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Manufacturer DESC
For those products with a price between 60 and 120, return a bar chart about the distribution of name and manufacturer , and sort in desc by the y-axis.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT MIN(first_elected) FROM table_1341663_33 WHERE incumbent = "Stephen J. Solarz"
When was Stephen J. Solarz first elected?
CREATE TABLE table_1341663_33 (first_elected INTEGER, incumbent VARCHAR)
SELECT COUNT(DISTINCT bike_id) FROM trip
From the trip record, find the number of unique bikes.
CREATE TABLE trip (bike_id VARCHAR)
SELECT "Winner" FROM table_50927 WHERE "FIS Nordic World Ski Championships" = '1972'
Who won the FIS Nordic World Ski Championships in 1972?
CREATE TABLE table_50927 ( "Winner" text, "Country" text, "Winter Olympics" real, "FIS Nordic World Ski Championships" text, "Holmenkollen" text )
SELECT candidates FROM table_1341663_33 WHERE incumbent = "Shirley Chisholm"
Who were the candidates when Shirley Chisholm was the incumbent?
CREATE TABLE table_1341663_33 (candidates VARCHAR, incumbent VARCHAR)
SELECT COUNT(DISTINCT city) FROM station
What is the number of distinct cities the stations are located at?
CREATE TABLE station (city VARCHAR)
SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC
For those employees who was hired before 2002-06-21, give me the comparison about the average of department_id over the job_id , and group by attribute job_id, show x-axis in descending order.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) )
SELECT district FROM table_1341663_6 WHERE incumbent = "Bob Wilson"
What is the district that has Bob Wilson as an incumbent?
CREATE TABLE table_1341663_6 (district VARCHAR, incumbent VARCHAR)
SELECT COUNT(*) FROM station WHERE city = "Mountain View"
How many stations does Mountain View city has?
CREATE TABLE station (city VARCHAR)
SELECT listed_owner_s_ FROM table_2187178_1 WHERE team = "Brevak Racing"
Name the listed owners for brevak racing
CREATE TABLE table_2187178_1 ( listed_owner_s_ VARCHAR, team VARCHAR )
SELECT COUNT(result) FROM table_1341663_6 WHERE district = "California 38"
How many outcomes were there in the elections in California 38?
CREATE TABLE table_1341663_6 (result VARCHAR, district VARCHAR)
SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7
Return the unique name for stations that have ever had 7 bikes available.
CREATE TABLE station (name VARCHAR, id VARCHAR); CREATE TABLE status (station_id VARCHAR, bikes_available VARCHAR)
SELECT SUM("Year") FROM table_7061 WHERE "Weight (kg)" = '857'
What is the sum total of all the years with a bell that weighed 857 kilograms?
CREATE TABLE table_7061 ( "Year" real, "Foundry" text, "Diameter (mm)" real, "Weight (kg)" text, "Nominal Tone" text )
SELECT district FROM table_1341663_6 WHERE incumbent = "Charles H. Wilson"
What district is Charles H. Wilson the incumbent of?
CREATE TABLE table_1341663_6 (district VARCHAR, incumbent VARCHAR)
SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE "8/%" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1
Which start station had the most trips starting from August? Give me the name and id of the station.
CREATE TABLE trip (start_station_name VARCHAR, start_station_id VARCHAR, start_date VARCHAR)
SELECT Id AS "post_link" FROM Posts WHERE Title LIKE '%Magento%'
Questions with 'Magento' in title.
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId 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 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 Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewTaskStates ( 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 PostTypes ( Id number, Name text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE VoteTypes ( Id number, Name text )
SELECT party FROM table_1341663_6 WHERE district = "California 30"
What party was the winning one in the elections in the California 30 district?
CREATE TABLE table_1341663_6 (party VARCHAR, district VARCHAR)
SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1
Which bike traveled the most often in zip code 94002?
CREATE TABLE trip (bike_id VARCHAR, zip_code VARCHAR)
SELECT money___$__ FROM table_name_46 WHERE player = "chris riley"
What is Chris Riley's Money?
CREATE TABLE table_name_46 ( money___$__ VARCHAR, player VARCHAR )
SELECT COUNT(result) FROM table_1341672_6 WHERE candidates = "Robert L. Leggett (D) 50.2% Albert Dehr (R) 49.8%"
How many times did an election feature the result robert l. leggett (d) 50.2% albert dehr (r) 49.8%?
CREATE TABLE table_1341672_6 (result VARCHAR, candidates VARCHAR)
SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8
How many days had both mean humidity above 50 and mean visibility above 8?
CREATE TABLE weather (mean_humidity VARCHAR, mean_visibility_miles VARCHAR)
SELECT speed FROM roller_coaster ORDER BY length DESC LIMIT 1
What are the speeds of the longest roller coaster?
CREATE TABLE country ( country_id number, name text, population number, area number, languages text ) CREATE TABLE roller_coaster ( roller_coaster_id number, name text, park text, country_id number, length number, height number, speed text, opened text, status text )
SELECT MIN(first_elected) FROM table_1341672_6 WHERE incumbent = "Mark W. Hannaford"
What year was incumbent mark w. hannaford elected?
CREATE TABLE table_1341672_6 (first_elected INTEGER, incumbent VARCHAR)
SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1
What is the latitude, longitude, city of the station from which the shortest trip started?
CREATE TABLE trip (start_station_id VARCHAR, duration VARCHAR); CREATE TABLE station (lat VARCHAR, long VARCHAR, city VARCHAR, id VARCHAR)
SELECT MIN(points) FROM table_name_48 WHERE year = "2013" AND goals < 0
What are the lowest points with 2013 as the year, and goals less than 0?
CREATE TABLE table_name_48 ( points INTEGER, year VARCHAR, goals VARCHAR )
SELECT district FROM table_1341672_10 WHERE incumbent = "Richard Kelly"
what is the district where the incumbent is richard kelly?
CREATE TABLE table_1341672_10 (district VARCHAR, incumbent VARCHAR)
SELECT id FROM station WHERE city = "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10
What are the ids of stations that are located in San Francisco and have average bike availability above 10.
CREATE TABLE status (id VARCHAR, station_id VARCHAR, city VARCHAR, bikes_available INTEGER); CREATE TABLE station (id VARCHAR, station_id VARCHAR, city VARCHAR, bikes_available INTEGER)
SELECT "Runner(s)-up" FROM table_16888 WHERE "Margin of victory" = '11 strokes'
Who were the runner(s)-up when Tiger won by 11 strokes?
CREATE TABLE table_16888 ( "Year" real, "Championship" text, "54 holes" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT result FROM table_1341672_10 WHERE candidates = "Robert L. F. Sikes (D) Unopposed"
what is the result where the candidates is robert l. f. sikes (d) unopposed?
CREATE TABLE table_1341672_10 (result VARCHAR, candidates VARCHAR)
SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date LIKE "12/%"
What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?
CREATE TABLE station (name VARCHAR, id VARCHAR); CREATE TABLE station (name VARCHAR, id VARCHAR, installation_date VARCHAR); CREATE TABLE status (station_id VARCHAR, bikes_available INTEGER)
SELECT segment_a FROM table_15187735_8 WHERE series_ep = "8-08"
Name the segment a for 8-08
CREATE TABLE table_15187735_8 ( segment_a VARCHAR, series_ep VARCHAR )
SELECT incumbent FROM table_1341672_10 WHERE candidates = "William V. Chappell, Jr. (D) Unopposed"
who is the incumbent where the candidates is william v. chappell, jr. (d) unopposed?
CREATE TABLE table_1341672_10 (incumbent VARCHAR, candidates VARCHAR)
SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3
What is the 3 most common cloud cover rates in the region of zip code 94107?
CREATE TABLE weather (cloud_cover VARCHAR, zip_code VARCHAR)
SELECT COUNT(outputs) FROM table_25276250_3 WHERE notes = "Solid state, battery operated for portable use"
How many outputs are there for solid state, battery operated for portable use listed in notes?
CREATE TABLE table_25276250_3 ( outputs VARCHAR, notes VARCHAR )
SELECT district FROM table_1341672_10 WHERE incumbent = "James A. Haley"
what is the district where the incumbent is james a. haley?
CREATE TABLE table_1341672_10 (district VARCHAR, incumbent VARCHAR)
SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) LIMIT 1
What is the zip code in which the average mean sea level pressure is the lowest?
CREATE TABLE weather (zip_code VARCHAR, mean_sea_level_pressure_inches INTEGER)
SELECT name FROM table_24990183_7 WHERE rank = 17
If the rank is 17, what are the names?
CREATE TABLE table_24990183_7 ( name VARCHAR, rank VARCHAR )
SELECT candidates FROM table_1341672_10 WHERE district = "Florida 8"
who are the candidates where the district is florida 8?
CREATE TABLE table_1341672_10 (candidates VARCHAR, district VARCHAR)
SELECT AVG(bikes_available) FROM status WHERE NOT station_id IN (SELECT id FROM station WHERE city = "Palo Alto")
What is the average bike availability in stations that are not located in Palo Alto?
CREATE TABLE status (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, city VARCHAR); CREATE TABLE station (bikes_available INTEGER, station_id VARCHAR, id VARCHAR, city VARCHAR)
SELECT SUM(1979) FROM table_name_51 WHERE reservation = "standing rock indian reservation" AND 1989 < 54.9
What is the 1979 number for Standing Rock Indian Reservation when the 1989 is less than 54.9?
CREATE TABLE table_name_51 ( reservation VARCHAR )
SELECT first_elected FROM table_1341690_13 WHERE incumbent = "Sidney R. Yates"
what year was the first elected incumbant Sidney R. Yates?
CREATE TABLE table_1341690_13 (first_elected VARCHAR, incumbent VARCHAR)
SELECT AVG(long) FROM station WHERE NOT id IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10)
What is the average longitude of stations that never had bike availability more than 10?
CREATE TABLE station (long INTEGER, id VARCHAR, station_id VARCHAR, bikes_available INTEGER); CREATE TABLE status (long INTEGER, id VARCHAR, station_id VARCHAR, bikes_available INTEGER)
SELECT "Opponent" FROM table_49308 WHERE "Attendance" = '58,836'
What is Opponent, when Attendance is 58,836?
CREATE TABLE table_49308 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
SELECT COUNT(incumbent) FROM table_1341690_18 WHERE district = "Louisiana 5"
How many incumbents are there in district Louisiana 5?
CREATE TABLE table_1341690_18 (incumbent VARCHAR, district VARCHAR)
SELECT date, zip_code FROM weather WHERE max_temperature_f >= 80
When and in what zip code did max temperature reach 80?
CREATE TABLE weather (date VARCHAR, zip_code VARCHAR, max_temperature_f VARCHAR)
SELECT AVG("Example code (HUC)") FROM table_41893 WHERE "Example name" = 'lower snake' AND "Digits" = '6' AND "Level" < '3'
What is the mean huc example code when the example name's lower snake, there are 6 digits, and less than 3 levels?
CREATE TABLE table_41893 ( "Name" text, "Level" real, "Digits" real, "Average size (square miles)" text, "Number of HUs (approximate)" real, "Example name" text, "Example code (HUC)" real )
SELECT COUNT(incumbent) FROM table_1341690_18 WHERE result = "Lost renomination Republican gain"
How many incumbents resulted in a lost renomination republican gain?
CREATE TABLE table_1341690_18 (incumbent VARCHAR, result VARCHAR)
SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING AVG(T2.mean_temperature_f) > 60
Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.
CREATE TABLE trip (id VARCHAR, zip_code VARCHAR); CREATE TABLE weather (zip_code VARCHAR, mean_temperature_f INTEGER)
SELECT MIN("Qtr. Final (Week)") FROM table_29572 WHERE "Name/Name of Act" = 'Austin Anderson'
What is the quarterfinal week for Austin Anderson?
CREATE TABLE table_29572 ( "Name/Name of Act" text, "Age(s)" text, "Genre" text, "Act" text, "Hometown" text, "Qtr. Final (Week)" real, "Semi Final (Week)" text, "Position Reached" text )
SELECT district FROM table_1341690_18 WHERE incumbent = "John Breaux"
In which district is the incumbent John Breaux?
CREATE TABLE table_1341690_18 (district VARCHAR, incumbent VARCHAR)
SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code
For each zip code, return how many times max wind speed reached 25?
CREATE TABLE weather (zip_code VARCHAR, max_wind_Speed_mph VARCHAR)
SELECT "Volume (hm\u00b3)" FROM table_30696 WHERE "Reservoir" = 'Tanes'
What is the volume when the resrvoir is Tanes?
CREATE TABLE table_30696 ( "Reservoir" text, "Basin" text, "Location" text, "Type" text, "Height (m)" text, "Length along the top (m)" text, "Drainage basin (km\u00b2)" text, "Reservoir surface (ha)" text, "Volume (hm\u00b3)" text )
SELECT MAX(first_elected) FROM table_1341690_18 WHERE candidates = "Otto Passman (D) Unopposed"
What year was Otto Passman (d) unopposed first elected?
CREATE TABLE table_1341690_18 (first_elected INTEGER, candidates VARCHAR)
SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)
On which day and in which zip code was the min dew point lower than any day in zip code 94107?
CREATE TABLE weather (date VARCHAR, zip_code VARCHAR, min_dew_point_f INTEGER)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "23" AND prescriptions.formulary_drug_cd = "ACYC400"
provide the number of patients whose days of hospital stay is greater than 23 and drug code is acyc400?
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 ) 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 )
SELECT result FROM table_1341690_18 WHERE incumbent = "John Breaux"
What were the results when the incumbent was John Breaux?
CREATE TABLE table_1341690_18 (result VARCHAR, incumbent VARCHAR)
SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id
For each trip, return its ending station's installation date.
CREATE TABLE station (installation_date VARCHAR, id VARCHAR); CREATE TABLE trip (id VARCHAR, end_station_id VARCHAR)
SELECT "Title" FROM table_23576 WHERE "Story #" = '91'
What's the title of the audio book with story number 91?
CREATE TABLE table_23576 ( "Story #" real, "Target #" text, "Title" text, "Author" text, "Reader" text, "Format" text, "Company" text, "Release Date" text, "Notes" text )
SELECT candidates FROM table_1341690_43 WHERE district = "Texas 1"
Name the candidates for texas 1
CREATE TABLE table_1341690_43 (candidates VARCHAR, district VARCHAR)
SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1
Which trip started from the station with the largest dock count? Give me the trip id.
CREATE TABLE trip (id VARCHAR, start_station_id VARCHAR); CREATE TABLE station (id VARCHAR, dock_count VARCHAR)
SELECT class FROM table_name_9 WHERE erp_w = 800
What class is ERP W of 800?
CREATE TABLE table_name_9 ( class VARCHAR, erp_w VARCHAR )
SELECT incumbent FROM table_1341690_43 WHERE district = "Texas 12"
Name the incumbent for district texas 12
CREATE TABLE table_1341690_43 (incumbent VARCHAR, district VARCHAR)
SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> "San Francisco"
Count the number of trips that did not end in San Francisco city.
CREATE TABLE trip (end_station_id VARCHAR); CREATE TABLE station (id VARCHAR, city VARCHAR)
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'smoking cessation counseling given')
tell me the cost of the diagnosis for smoking cessation counseling given?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time )
SELECT candidates FROM table_1341690_43 WHERE district = "Texas 20"
Name the candidates for texas 20
CREATE TABLE table_1341690_43 (candidates VARCHAR, district VARCHAR)
SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> "Fog" AND EVENTS <> "Rain"
In zip code 94107, on which day neither Fog nor Rain was not observed?
CREATE TABLE weather (date VARCHAR, EVENTS VARCHAR, zip_code VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "2254"
what is the total number of patients who were diagnosed with icd9 code 2254?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text )
SELECT district FROM table_1341690_21 WHERE candidates = "Edward Boland (D) Unopposed"
what is the district with the candidates edward boland (d) unopposed?
CREATE TABLE table_1341690_21 (district VARCHAR, candidates VARCHAR)
SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7
What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?
CREATE TABLE status (id VARCHAR, station_id VARCHAR, lat INTEGER, bikes_available INTEGER); CREATE TABLE station (id VARCHAR, station_id VARCHAR, lat INTEGER, bikes_available INTEGER)
SELECT MAX(t1.low_temperature), AVG(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = "Amersham"
Give me the maximum low temperature and average precipitation at the Amersham station.
CREATE TABLE station ( id number, network_name text, services text, local_authority text ) CREATE TABLE route ( train_id number, station_id number ) CREATE TABLE weekly_weather ( station_id number, day_of_week text, high_temperature number, low_temperature number, precipitation number, wind_speed_mph number ) CREATE TABLE train ( id number, train_number number, name text, origin text, destination text, time text, interval text )
SELECT party FROM table_1341690_21 WHERE candidates = "Edward Boland (D) Unopposed"
what is the party where the candidates are edward boland (d) unopposed?
CREATE TABLE table_1341690_21 (party VARCHAR, candidates VARCHAR)
SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = "San Jose"
What are names of stations that have average bike availability above 10 and are not located in San Jose city?
CREATE TABLE station (name VARCHAR, id VARCHAR); CREATE TABLE status (station_id VARCHAR); CREATE TABLE station (name VARCHAR, city VARCHAR, bikes_available INTEGER)
SELECT event FROM table_name_20 WHERE location = "manly beach"
Which event was held at Manly Beach?
CREATE TABLE table_name_20 ( event VARCHAR, location VARCHAR )
SELECT party FROM table_1341690_21 WHERE incumbent = "Edward Boland"
what is the party where the incumbent is edward boland?
CREATE TABLE table_1341690_21 (party VARCHAR, incumbent VARCHAR)
SELECT name, lat, city FROM station ORDER BY lat LIMIT 1
What are the name, latitude, and city of the station with the lowest latitude?
CREATE TABLE station (name VARCHAR, lat VARCHAR, city VARCHAR)
SELECT "Home team" FROM table_43959 WHERE "Away team" = 'bolton wanderers'
Who was the home team against the Bolton Wanderers?
CREATE TABLE table_43959 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text )
SELECT COUNT(incumbent) FROM table_1341690_21 WHERE candidates = "Paul Tsongas (D) 60.6% Paul W. Cronin (R) 39.4%"
How many times was the candidates paul tsongas (d) 60.6% paul w. cronin (r) 39.4%?
CREATE TABLE table_1341690_21 (incumbent VARCHAR, candidates VARCHAR)
SELECT date, mean_temperature_f, mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3
What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?
CREATE TABLE weather (date VARCHAR, mean_temperature_f VARCHAR, mean_humidity VARCHAR, max_gust_speed_mph VARCHAR)
SELECT P.OwnerUserId, P.Title, P.Tags, P.ViewCount, P.Score, P.AnswerCount, P.CreationDate FROM Posts AS P WHERE (P.Tags LIKE '%android-testing%') OR (P.Tags LIKE '%robotium%') OR (P.Tags LIKE '%androidviewclient%') OR (P.Tags LIKE '%monkeyrunner%') OR (P.Tags LIKE '%android-espresso%') OR (P.Tags LIKE '%android-emulator%') OR (P.Tags LIKE '%android%' AND P.Tags LIKE '%uiautomator%') OR (P.Tags LIKE '%android%' AND P.Tags LIKE '%appium%') OR (P.Tags LIKE '%android%' AND P.Tags LIKE '%calabash%') OR (P.Tags LIKE '%android%' AND P.Tags LIKE '%test%') ORDER BY P.Score DESC
All Info About Mobile Android Testing.
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE FlagTypes ( 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 PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name 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 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 SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress 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 ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE 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 ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE 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 )
SELECT candidates FROM table_1341690_20 WHERE incumbent = "Goodloe Byron"
List all candidates in elections where the incumbent politician is Goodloe Byron.
CREATE TABLE table_1341690_20 (candidates VARCHAR, incumbent VARCHAR)
SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15
List the name and the number of stations for all the cities that have at least 15 stations.
CREATE TABLE station (city VARCHAR)
SELECT "Away team score" FROM table_51600 WHERE "Away team" = 'south melbourne'
Tell me the away team score for away team of south melbourne
CREATE TABLE table_51600 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT COUNT(party) FROM table_1341690_20 WHERE incumbent = "Robert Bauman"
How many instances are there of party in the situation where Robert Bauman is the incumbent politician?
CREATE TABLE table_1341690_20 (party VARCHAR, incumbent VARCHAR)
SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200
Find the ids and names of stations from which at least 200 trips started.
CREATE TABLE trip (start_station_id VARCHAR, start_station_name VARCHAR)
SELECT SUM("Year") FROM table_55306 WHERE "Animal" = 'downy woodpecker'
What year was the downy woodpecker coin created?
CREATE TABLE table_55306 ( "Year" real, "Animal" text, "Artist" text, "Finish" text, "Mintage" real, "Issue Price" text )
SELECT party FROM table_1341690_20 WHERE incumbent = "Robert Bauman"
What is the party of the election in which Robert Bauman is the incumbent?
CREATE TABLE table_1341690_20 (party VARCHAR, incumbent VARCHAR)
SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10
Find the zip code in which the average mean visibility is lower than 10.
CREATE TABLE weather (zip_code VARCHAR, mean_visibility_miles INTEGER)
SELECT "Model" FROM table_28269 WHERE "Launch" = 'September 3, 2010'
What model has a launch of September 3, 2010?
CREATE TABLE table_28269 ( "Model" text, "Launch" text, "Code name" text, "Transistors (million)" real, "Die size (mm 2 )" real, "Bus interface" text, "Memory ( MB )" text, "SM count" real, "Core config 1,3" text, "Core ( MHz )" real, "Shader ( MHz )" real, "Memory ( MHz )" text, "Pixel ( GP /s)" text, "Texture ( GT /s)" text, "Bandwidth ( GB /s)" text, "DRAM type" text, "Bus width ( bit )" real, "GFLOPS (FMA) 2" text, "TDP (watts)" real, "Release price (USD)" text )
SELECT result FROM table_1341690_20 WHERE district = "Maryland 7"
List all results where the voting district is Maryland 7.
CREATE TABLE table_1341690_20 (result VARCHAR, district VARCHAR)