table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE table_214479_8 ( y_ VARCHAR, _2008 VARCHAR, expression VARCHAR )
what is the y = 2008 when the expression is easter day (julian calendar)?
SELECT y_ = _2008 FROM table_214479_8 WHERE expression = "Easter Day (Julian calendar)"
CREATE TABLE ship ( name VARCHAR, built_year VARCHAR, CLASS VARCHAR )
List all ship names in the order of built year and class.
SELECT name FROM ship ORDER BY built_year, CLASS
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
Give me the comparison about Team_ID over the All_Neutral , I want to show All_Neutral in desc order.
SELECT All_Neutral, Team_ID FROM basketball_match ORDER BY All_Neutral DESC
CREATE TABLE table_63419 ( "Place" real, "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals Scored" real, "Goals Conceded" real, "Points" real )
What's the draw that's played less than 36 and has 42 points?
SELECT AVG("Draw") FROM table_63419 WHERE "Points" = '42' AND "Played" < '36'
CREATE TABLE table_name_70 ( opponent VARCHAR, record VARCHAR )
Who did the Mariners play when their record was 26 32?
SELECT opponent FROM table_name_70 WHERE record = "26–32"
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id nu...
Welcome comments on posts older than 14 days.
SELECT c.CreationDate, c.Id AS "comment_link", c.Text FROM Comments AS c INNER JOIN Posts AS p ON p.Id = c.PostId WHERE Text LIKE 'Welcome to%' AND DATEDIFF(day, p.LastActivityDate, GETDATE()) >= 14 ORDER BY c.CreationDate DESC
CREATE TABLE table_75795 ( "Television service" text, "Country" text, "Language" text, "Content" text, "HDTV" text, "Package/Option" text )
What is Package/Option, when Content is Poker?
SELECT "Package/Option" FROM table_75795 WHERE "Content" = 'poker'
CREATE TABLE table_55949 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which team plays at Lake Oval?
SELECT "Home team" FROM table_55949 WHERE "Venue" = 'lake oval'
CREATE TABLE table_5228 ( "Season" text, "Tier" real, "League" text, "Pos." real, "Postseason" text, "European competitions" text )
What is the total number of tiers for the postseason of semifinalist?
SELECT SUM("Tier") FROM table_5228 WHERE "Postseason" = 'semifinalist'
CREATE TABLE table_60481 ( "Edition" text, "Round" text, "Date" text, "Surface" text, "Opponent" text, "Result" text )
What clay surface edition had an opponent of miho saeki?
SELECT "Edition" FROM table_60481 WHERE "Surface" = 'clay' AND "Opponent" = 'miho saeki'
CREATE TABLE table_26316 ( "Rank" real, "Operators Name" text, "Technology" text, "Subscribers (in millions)" text, "Ownership" text, "Market Share" text )
What was the rank of operator whose technology is CDMA EVDO?
SELECT MIN("Rank") FROM table_26316 WHERE "Technology" = 'CDMA EVDO'
CREATE TABLE table_9630 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What was the attendance for the week 1 game?
SELECT "Attendance" FROM table_9630 WHERE "Week" = '1'
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
when did patient 031-24513 in their last hospital encounter first get a urine, voided specimen microbiology test?
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-24513' AND NOT patient.hospitaldischargetime IS NULL ORDER BY...
CREATE TABLE table_26507 ( "Team" text, "Location" text, "Stadium" text, "Capacity" real, "Manager" text, "Captain" text )
Who is the captain in Chaguaramas?
SELECT "Captain" FROM table_26507 WHERE "Location" = 'Chaguaramas'
CREATE TABLE table_32096 ( "2nd component" text, "b.p. 2nd comp. (\u02daC)" real, "3rd component" text, "b.p. 3rd comp. (\u02daC)" text, "b.p. azeo. (\u02daC)" text, "% wt 1st" text, "% wt 2nd" text, "% wt 3rd" text )
Tell me the 3rd component for bp azeo of 62.1
SELECT "3rd component" FROM table_32096 WHERE "b.p. azeo. (\u02daC)" = '62.1'
CREATE TABLE table_51578 ( "Club" text, "Leagues" text, "Venue" text, "Location" text, "Capacity" real, "Established" real )
What is the capacity at the nop aquatic centre, established after 1929?
SELECT COUNT("Capacity") FROM table_51578 WHERE "Venue" = 'nop aquatic centre' AND "Established" > '1929'
CREATE TABLE table_49641 ( "County" text, "Kerry%" text, "Kerry#" real, "Bush%" text, "Bush#" real, "Others%" text, "Others#" real, "2000 result" text )
How many votes went to other candidates in the county that gave 1.9% votes to them, and 160,390 total votes to Bush?
SELECT MIN("Others#") FROM table_49641 WHERE "Others%" = '1.9%' AND "Bush#" < '160,390'
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE date_day ...
i need to find a plane from BOSTON to SAN FRANCISCO on friday
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 25 AND date_day.month_number = 6...
CREATE TABLE table_56136 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which Away team score has a Home team of richmond?
SELECT "Away team score" FROM table_56136 WHERE "Home team" = 'richmond'
CREATE TABLE table_name_73 ( date VARCHAR, attendance VARCHAR )
Which Date has an Attendance of 9,535?
SELECT date FROM table_name_73 WHERE attendance = "9,535"
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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
what time was patient 1902 prescribed for a medication for the last time since 05/2105?
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1902) AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-05' ORDER BY prescriptions.startdate DESC LIMIT 1
CREATE TABLE table_7956 ( "Rank" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the highest Bronze with a Silver greater than 0 and a Gold of 7 and a total less than 29
SELECT MAX("Bronze") FROM table_7956 WHERE "Silver" > '0' AND "Gold" = '7' AND "Total" < '29'
CREATE TABLE table_52524 ( "Munsee Delaware" text, "Unami Delaware" text, "De Laet (1633)" text, "Campanius (ca. 1645)" text, "Interpreter (1684?)" text, "Thomas (1698)" text )
What is the Unami Delaware value for a Thomas value of nacha?
SELECT "Unami Delaware" FROM table_52524 WHERE "Thomas (1698)" = 'nacha'
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilege...
Number of answers and views of answers in year.
SELECT COUNT(*) AS Count, SUM(q.ViewCount) AS Views FROM Posts AS a JOIN Posts AS q ON q.Id = a.ParentId WHERE a.OwnerUserId = '##userId##' AND a.PostTypeId = 2 AND q.PostTypeId = 1 AND a.CreationDate >= '##year##0101' AND a.CreationDate <= '##year##1231'
CREATE TABLE table_8670 ( "Date" text, "Home" text, "Score" text, "Away" text, "Attendance" real )
Which score was associated with an attendance of 275?
SELECT "Score" FROM table_8670 WHERE "Attendance" = '275'
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 )
For those records from the products and each product's manufacturer, return a scatter chart about the correlation between code and price , and group by attribute founder.
SELECT T1.Code, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
CREATE TABLE table_73073 ( "Date" text, "B-52 Model" text, "Serial #" text, "Unit" text, "Bomb Capacity" text, "Mission/Target" text, "Cause of Loss" text )
When 7th bw attached to 43rd sw is the unit what is the b-52 model?
SELECT "B-52 Model" FROM table_73073 WHERE "Unit" = '7th BW attached to 43rd SW'
CREATE TABLE table_name_22 ( set_3 VARCHAR, time VARCHAR, set_2 VARCHAR )
Which Set 3 has a Time of 10:00, and a Set 2 of 25 19?
SELECT set_3 FROM table_name_22 WHERE time = "10:00" AND set_2 = "25–19"
CREATE TABLE table_56499 ( "Wind farm" text, "Capacity (MW)" real, "Country" text, "State/Province" text, "Notes" text )
Which state is Tehachapi Pass Wind Farm located in?
SELECT "State/Province" FROM table_56499 WHERE "Wind farm" = 'tehachapi pass wind farm'
CREATE TABLE table_name_67 ( attendance VARCHAR, result VARCHAR, year VARCHAR, venue VARCHAR )
What's the total attendance at anaheim stadium after 1983 when the result is 14-28?
SELECT COUNT(attendance) FROM table_name_67 WHERE year > 1983 AND venue = "anaheim stadium" AND result = "14-28"
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 t...
give the number of patients whose admission type is emergency and ethnicity is american indian/alaska native.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE"
CREATE TABLE table_name_25 ( home_team VARCHAR )
What was the essendon score when they were at home?
SELECT home_team AS score FROM table_name_25 WHERE home_team = "essendon"
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, language text, religion text, ...
what is the number of patients whose admission location is trsf within this facility and days of hospital stay is greater than 34?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.days_stay > "34"
CREATE TABLE table_3051 ( "Seed" real, "Rank" real, "Player" text, "Points" real, "Points defending" real, "Points won" real, "New points" real, "Status" text )
What is the highest points won when the player is aravane reza ?
SELECT MAX("Points won") FROM table_3051 WHERE "Player" = 'Aravane Rezaï'
CREATE TABLE table_72389 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
What is the earliest first elected for district georgia 1?
SELECT MIN("First elected") FROM table_72389 WHERE "District" = 'Georgia 1'
CREATE TABLE table_60986 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
What was the result of the game that had 77,702 people in attendance?
SELECT "Result" FROM table_60986 WHERE "Attendance" = '77,702'
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 prescriptions...
count the number of patients less than 58 years on neb route of drug administration.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "58" AND prescriptions.route = "NEB"
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, r...
i'd like to fly round trip from BOSTON to PITTSBURGH
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND NOT fare.round_trip_cost IS NULL AND flight_fare.fare_...
CREATE TABLE table_name_42 ( final INTEGER, all_around VARCHAR, total VARCHAR )
What is the average final with an all around greater than 19.35 and a total over 40?
SELECT AVG(final) FROM table_name_42 WHERE all_around > 19.35 AND total > 40
CREATE TABLE table_26725 ( "Country or region" text, "Highest point" text, "Maximum elevation" text, "Lowest point" text, "Minimum elevation" text, "Elevation span" text )
What are the highest point in latvia
SELECT "Highest point" FROM table_26725 WHERE "Country or region" = 'Latvia'
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 ) C...
what is insurance of subject name kelly gallardo?
SELECT demographic.insurance FROM demographic WHERE demographic.name = "Kelly Gallardo"
CREATE TABLE table_name_85 ( competition VARCHAR, date VARCHAR )
What competition took place on 10 August 2011?
SELECT competition FROM table_name_85 WHERE date = "10 august 2011"
CREATE TABLE table_46831 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Rockets score" real, "Opponents" real, "Record" text, "Streak" text )
Which Date has a Rockets score of 94, and a Game of 66?
SELECT "Date" FROM table_46831 WHERE "Rockets score" = '94' AND "Game" = '66'
CREATE TABLE table_14977252_2 ( draw INTEGER, artist VARCHAR )
Name the least draw for elena dermidjean
SELECT MIN(draw) FROM table_14977252_2 WHERE artist = "Elena Dermidjean"
CREATE TABLE table_18646111_13 ( round_1 VARCHAR, event VARCHAR )
Name the round 1 for team event
SELECT round_1 FROM table_18646111_13 WHERE event = "Team"
CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) CREATE TABLE geographic ( city_name varchar, county varchar, region varchar ) CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_n...
where is a good arabic on buchanan in san francisco ?
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'san francisco' AND location.street_name = 'buchanan' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
CREATE TABLE table_name_85 ( points INTEGER, year INTEGER )
What were the total Pints after 1957?
SELECT SUM(points) FROM table_name_85 WHERE year > 1957
CREATE TABLE table_58268 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Series" text )
What is the series score of the game with Vancouver as the visiting team on April 16?
SELECT "Series" FROM table_58268 WHERE "Visitor" = 'vancouver' AND "Date" = 'april 16'
CREATE TABLE finrev_fed_17 ( state_code number, idcensus number, school_district text, nces_id text, yr_data number, t_fed_rev number, c14 number, c25 number ) CREATE TABLE finrev_fed_key_17 ( state_code number, state text, #_records text ) CREATE TABLE ndecoreexcel_math_gr...
State with highest average math score
SELECT state FROM ndecoreexcel_math_grade8 ORDER BY average_scale_score DESC LIMIT 1
CREATE TABLE table_73274 ( "English Name" text, "Simplified" text, "Traditional" text, "Pinyin" text, "Area" real, "Population" real, "Density" real )
What is the Pinyin for the simplified ?
SELECT "Pinyin" FROM table_73274 WHERE "Simplified" = '虞城县'
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(...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, return a scatter chart about the correlation between employee_id and salary .
SELECT EMPLOYEE_ID, SALARY FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
CREATE TABLE table_31526 ( "Economy" text, "1980" real, "Gap from Thailand as of 1980 (times)" text, "1985" real, "1990" real, "1995" real, "2000" real, "2005" real, "2010" real, "2012" real, "Gap from Thailand as of 2012 (times)" text, "GDP as of 2012 after purchasing po...
How many GDPs as of 2012 after PPP values are associated with a 2012 value of 23113?
SELECT COUNT("GDP as of 2012 after purchasing power parity (PPP) calculations (USD billions)") FROM table_31526 WHERE "2012" = '23113'
CREATE TABLE table_70502 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
Can you tell me the Chassis that has the Year of 1977?
SELECT "Chassis" FROM table_70502 WHERE "Year" = '1977'
CREATE TABLE table_1342379_41 ( result VARCHAR, candidates VARCHAR )
How many times was the election joseph w. byrns, sr. (d) unopposed?
SELECT COUNT(result) FROM table_1342379_41 WHERE candidates = "Joseph W. Byrns, Sr. (D) Unopposed"
CREATE TABLE table_51291 ( "Entrant" text, "Constructor" text, "Chassis" text, "Engine \u2020" text, "Tyre" text, "Driver" text, "Rounds" text )
What is the constructor of driver Alexander Wurz?
SELECT "Constructor" FROM table_51291 WHERE "Driver" = 'alexander wurz'
CREATE TABLE table_62167 ( "Party" text, "Name in English" text, "City" text, "Province" text, "Date of registration" text )
On what date was the Canarian Workers Socialist Union registered?
SELECT "Date of registration" FROM table_62167 WHERE "Name in English" = 'canarian workers socialist union'
CREATE TABLE table_name_46 ( country VARCHAR, ief_2011 VARCHAR )
What country has an IEF 2011 of 45.3?
SELECT country FROM table_name_46 WHERE ief_2011 = "45.3"
CREATE TABLE table_3339 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text )
Name the total number of population 2011 for perlez
SELECT COUNT("Population (2011)") FROM table_3339 WHERE "Settlement" = 'Perlez'
CREATE TABLE table_name_69 ( year__ceremony_ VARCHAR, original_title VARCHAR )
What year was Zona Sur nominated?
SELECT year__ceremony_ FROM table_name_69 WHERE original_title = "zona sur"
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 t...
how many patients whose admission type is emergency and diagnoses long title is major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior"
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE time_inte...
show me round trip fares between SAN FRANCISCO and WASHINGTON
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_...
CREATE TABLE table_437 ( "Series #" real, "Season #" real, "Episode title" text, "Writer(s)" text, "Director" text, "U.S. viewers (millions)" text, "Original air date" text )
What is the name of the episode written by Sheila Lawrence & Henry Alonso Myers?
SELECT "Episode title" FROM table_437 WHERE "Writer(s)" = 'Sheila Lawrence & Henry Alonso Myers'
CREATE TABLE table_name_53 ( assists INTEGER, rank VARCHAR )
What is the least number of assists among players ranked 2?
SELECT MIN(assists) FROM table_name_53 WHERE rank = 2
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 ) CRE...
Top users from Barcelona, Spain.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE (LOWER(Location) LIKE '%barcelona%' OR LOWER(Location) LIKE '%bcn%') ORDER BY Reputation DESC
CREATE TABLE table_80381 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text )
Who won the Women's singles, in the year that Raymond M. White won the Men's singles and that W. Hamilton Ian Maconachie won the Men's doubles?
SELECT "Women's singles" FROM table_80381 WHERE "Men's singles" = 'raymond m. white' AND "Men's doubles" = 'w. hamilton ian maconachie'
CREATE TABLE table_5386 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
What was the record on december 8 when the boston bruins visited?
SELECT "Record" FROM table_5386 WHERE "Visitor" = 'boston bruins' AND "Date" = 'december 8'
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetake...
how many patients were diagnosed with s/p hip surgery and did not come to the hospital within the same month in the last year?
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p hip surgery' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), '...
CREATE TABLE table_39660 ( "Number" real, "Result" text, "Date" text, "Score" text, "Opponent" text, "Record" text )
What's the number of the game played on January 2, 1936?
SELECT MIN("Number") FROM table_39660 WHERE "Date" = 'january 2, 1936'
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 ...
has patient 7107 had a potassium test during this month?
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7107) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TIME...
CREATE TABLE table_48380 ( "Date" text, "Home" text, "Score" text, "Away" text, "Attendance" real )
Home for away of hispano?
SELECT "Home" FROM table_48380 WHERE "Away" = 'hispano'
CREATE TABLE table_35213 ( "Year" real, "Group" text, "Award" text, "Film" text, "Result" text )
Which Film has a Result of nominated, and a Year of 2001?
SELECT "Film" FROM table_35213 WHERE "Result" = 'nominated' AND "Year" = '2001'
CREATE TABLE table_name_43 ( date VARCHAR, attendance INTEGER )
What is Date, when Attendance is less than 521?
SELECT date FROM table_name_43 WHERE attendance < 521
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_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) ...
what are the five most commonly prescribed medications since 2100?
SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE STRFTIME('%y', prescriptions.startdate) >= '2100' GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 5
CREATE TABLE table_name_58 ( venue VARCHAR, competition VARCHAR, score VARCHAR )
What is the Venue of the Friendly Competition with a Score of 1 4?
SELECT venue FROM table_name_58 WHERE competition = "friendly" AND score = "1–4"
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 ) ...
specify the marital status of patient id 18480
SELECT demographic.marital_status FROM demographic WHERE demographic.subject_id = "18480"
CREATE TABLE table_name_38 ( heat INTEGER, name VARCHAR )
What is the average Heat for anjelika solovieva?
SELECT AVG(heat) FROM table_name_38 WHERE name = "anjelika solovieva"
CREATE TABLE table_51136 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What is Country, when Score is 71-71-69=211?
SELECT "Country" FROM table_51136 WHERE "Score" = '71-71-69=211'
CREATE TABLE table_14 ( "#" text, "Shipyard" text, "Laid down" text, "Launched" text, "Commissioned" text, "Fleet" text, "Status" text )
When were the ships launched that were laid down on september 1, 1964?
SELECT "Launched" FROM table_14 WHERE "Laid down" = 'September 1, 1964'
CREATE TABLE table_name_28 ( geo_id VARCHAR, ansi_code VARCHAR, water__sqmi_ VARCHAR, township VARCHAR )
What is the number of GEO IDs for areas in Riggin township with water area over 0.587 sq mi and ANSI codes over 1759257?
SELECT COUNT(geo_id) FROM table_name_28 WHERE water__sqmi_ > 0.587 AND township = "riggin" AND ansi_code > 1759257
CREATE TABLE organizations ( organization_name VARCHAR, date_formed VARCHAR )
List all the name of organizations in order of the date formed.
SELECT organization_name FROM organizations ORDER BY date_formed
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airlin...
what kind of aircraft is used on the FIRST class AA flight from PHILADELPHIA to SAN FRANCISCO stopping in DALLAS
SELECT DISTINCT aircraft.aircraft_code FROM aircraft, 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, equipment_sequence, fare, fare_basis, flight, flight_fare, flight_stop WHERE (((CITY_2.city_code = AIRPO...
CREATE TABLE table_name_17 ( north_american_release_date VARCHAR, japanese_release_date VARCHAR )
What is North American Release Date, when Japanese Release Date is '2011-06-23'?
SELECT north_american_release_date FROM table_name_17 WHERE japanese_release_date = "2011-06-23"
CREATE TABLE table_40025 ( "Goal" real, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
What is the result when there's less than 2 goals?
SELECT "Result" FROM table_40025 WHERE "Goal" < '2'
CREATE TABLE musical ( musical_id number, name text, year number, award text, category text, nominee text, result text ) CREATE TABLE actor ( actor_id number, name text, musical_id number, character text, duration text, age number )
List the name of musicals that do not have actors.
SELECT name FROM musical WHERE NOT musical_id IN (SELECT musical_id FROM actor)
CREATE TABLE table_46302 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text )
What date did the Boston Celtics play at Richfield Coliseum?
SELECT "Date" FROM table_46302 WHERE "Location" = 'richfield coliseum'
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
get the id of the patients who had been diagnosed with acute respiratory failure - due to inability to clear secretions in this year.
SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'acute respiratory failure - due to inability to clear secretions' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year'...
CREATE TABLE table_17632217_2 ( fourth_placed VARCHAR, total_wins VARCHAR, third_place VARCHAR, winners VARCHAR )
Who was placed fourth when third was Beijing Guoan and the winner was Dalian Wanda and wins total was 4?
SELECT fourth_placed FROM table_17632217_2 WHERE third_place = "Beijing Guoan" AND winners = "Dalian Wanda" AND total_wins = 4
CREATE TABLE table_69202 ( "2003/ 04" text, "2004/ 05" text, "2007/ 08" text, "2009/ 10" text, "2010/ 11" text, "2011/ 12" text, "2012/ 13" text )
What was held in 2003/04 when Former Ranking Tournaments was in 2007/08?
SELECT "2003/ 04" FROM table_69202 WHERE "2007/ 08" = 'former ranking tournaments'
CREATE TABLE table_name_27 ( registrations VARCHAR, type VARCHAR, station_number VARCHAR )
What is the registration of the station with a retained type and a station number of c03?
SELECT registrations FROM table_name_27 WHERE type = "retained" AND station_number = "c03"
CREATE TABLE table_204_661 ( id number, "team" text, "location" text, "home ground" text, "first year in\nqld cup" number, "last year in\nqld cup" number, "qld cup\npremierships" text )
which team has had the most queensland cup premierships ?
SELECT "team" FROM table_204_661 ORDER BY "qld cup\npremierships" DESC LIMIT 1
CREATE TABLE table_2887 ( "Rank" real, "Rider" text, "Mon 24 Aug" text, "Tues 25 Aug" text, "Wed 26 Aug" text, "Thurs 27 Aug" text, "Fri 28 Aug" text )
What is every value for Monday August 24 if Friday August 28 is 23' 22.25 96.864mph?
SELECT "Mon 24 Aug" FROM table_2887 WHERE "Fri 28 Aug" = '23'' 22.25 96.864mph'
CREATE TABLE table_13771 ( "School" text, "Location" text, "Mascot" text, "County" text, "Year joined" real, "Previous Conference" text, "Year Left" real, "Conference joined" text )
What's the mascot in Huntington after the year 2000?
SELECT "Mascot" FROM table_13771 WHERE "Year Left" > '2000' AND "Location" = 'huntington'
CREATE TABLE table_name_85 ( Id VARCHAR )
2006 of 10 4 is in which 2000?
SELECT 2000 FROM table_name_85 WHERE 2006 = "10–4"
CREATE TABLE table_26559 ( "Model number" text, "Frequency" text, "L1 Cache" text, "FSB" text, "Mult." text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "sSpec number" text )
What's the part number of the model with TDP of 2.9 (max.4.1~5.4) w?
SELECT "Part number(s)" FROM table_26559 WHERE "TDP" = '2.9 (Max.4.1~5.4) W'
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 procedures ( ...
what is primary disease and diagnoses icd9 code of subject name bruce harris?
SELECT demographic.diagnosis, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Bruce Harris"
CREATE TABLE table_25014 ( "English name" text, "Georgian name" text, "Transliteration" text, "Date" text, "Author" text, "Period covered" text )
Who is the auther when the english name was histories and eulogies of the sovereigns?
SELECT "Author" FROM table_25014 WHERE "English name" = 'Histories and Eulogies of the Sovereigns'
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 t...
what is the number of patients with abnormal lab test status who were diagnosed with perforation of intestine?
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.long_title = "Perforation of intestine" AND lab.flag = "abnormal"
CREATE TABLE table_name_66 ( period VARCHAR, other_mozilla VARCHAR )
What period has 0.25% as the other mozilla?
SELECT period FROM table_name_66 WHERE other_mozilla = "0.25%"
CREATE TABLE table_55299 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text, "Apparent magnitude" real )
I want the sum of NGC number for spiral galaxy and right acension of 08h14m40.4s
SELECT SUM("NGC number") FROM table_55299 WHERE "Object type" = 'spiral galaxy' AND "Right ascension ( J2000 )" = '08h14m40.4s'
CREATE TABLE table_26352332_4 ( cylinder_layout VARCHAR, years_produced VARCHAR, engine_family VARCHAR )
The engine family MaxxForce 5 in the years produced 2007-current, have what cylinder layout?
SELECT cylinder_layout FROM table_26352332_4 WHERE years_produced = "2007-current" AND engine_family = "MaxxForce 5"