instruction
stringlengths
57
490
output
stringlengths
69
1.29k
### Instruction: What is the title of the prerequisite class of International Finance course? ### Response:
SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')
### Instruction: Name the President who has a Treasurer of james davidson, and a Season of 2006 2007? ### Response:
SELECT "President" FROM table_8089 WHERE "Treasurer" = 'james davidson' AND "Season" = '2006โ€“2007'
### Instruction: In what Weeks is the game against the Tampa Bay Buccaneers with less than 44,506 in Attendance? ### Response:
SELECT SUM("Week") FROM table_47699 WHERE "Opponent" = 'tampa bay buccaneers' AND "Attendance" < '44,506'
### Instruction: how many male patients had the lab test name potassium, whole blood? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.label = "Potassium, Whole Blood"
### Instruction: In the tkkm o manawatu coed school in kelvin grove, what is the Authority listed/ ### Response:
SELECT "Authority" FROM table_71426 WHERE "Gender" = 'coed' AND "Area" = 'kelvin grove' AND "Name" = 'tkkm o manawatu'
### Instruction: Which LEMA/SUBLEMA that has Votes smaller than 218656, and a Ch of Deputies of 0? ### Response:
SELECT "LEMA/SUBLEMA" FROM table_36816 WHERE "Votes" < '218656' AND "Ch. of Deputies" = '0'
### Instruction: What is the number in the season that Marlene Meyer wrote and 20.49 million people watched? ### Response:
SELECT MAX(no_in_season) FROM table_10718984_2 WHERE written_by = "Marlene Meyer" AND us_viewers__millions_ = "20.49"
### Instruction: In what Year is the Isis Population 4,082 and the Regional Population less than 55,990? ### Response:
SELECT COUNT("Year") FROM table_15266 WHERE "Population (Isis)" = '4,082' AND "Population (Region total)" < '55,990'
### Instruction: how much does it cost for nacl 0.9% bolus? ### Response:
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'nacl 0.9% bolus')
### Instruction: Show me about the distribution of ACC_Road and the sum of Team_ID , and group by attribute ACC_Road in a bar chart, show from low to high by the Y. ### Response:
SELECT ACC_Road, SUM(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY SUM(Team_ID)
### Instruction: How many Winners have Wins of 1 and a Country of fiji and a First title smaller than 2004? ### Response:
SELECT AVG("Winners") FROM table_42706 WHERE "Wins" = '1' AND "Country" = 'fiji' AND "First title" < '2004'
### Instruction: Which 1st Party has a 2nd Member of sir charles wood, and a 1st Member of sir francis crossley? ### Response:
SELECT "1st Party" FROM table_12844 WHERE "2nd Member" = 'sir charles wood' AND "1st Member" = 'sir francis crossley'
### Instruction: find out the short title of diagnoses and diagnoses icd9 code for patient michelle medina. ### Response:
SELECT diagnoses.icd9_code, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Michelle Medina"
### Instruction: What league has a D position, a round smaller than 11 and is with Dennis Vial? ### Response:
SELECT "College/Junior/Club Team (League)" FROM table_5640 WHERE "Position" = 'd' AND "Round" < '11' AND "Player" = 'dennis vial'
### Instruction: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara. ### Response:
SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara") AND first_name <> "Clara"
### Instruction: how many more more bronze medals did russia earn than china ? ### Response:
SELECT (SELECT "bronze" FROM table_203_739 WHERE "nation" = 'russia') - (SELECT "bronze" FROM table_203_739 WHERE "nation" = 'china')
### Instruction: select by tag protected sorted. ### Response:
SELECT COUNT(Posts.Id) FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId JOIN Posts ON PostTags.PostId = Posts.Id JOIN PostHistory ON PostHistory.PostId = Posts.Id WHERE TagName = 'java' AND PostHistoryTypeId = 19
### Instruction: What are the id and details of the customers who have at least 3 events? ### Response:
SELECT T1.customer_id, T1.customer_details FROM customers AS T1 JOIN customer_events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 3
### Instruction: Papers authored by Daniel S. Weld in 2011 ### Response:
SELECT DISTINCT paper.paperid FROM author, paper, writes WHERE author.authorname = 'Daniel S. Weld' AND paper.year = 2011 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
### Instruction: Which tournament had a final score of 6 7, 2 6, and a Partner of wayne arthurs? ### Response:
SELECT "Tournament" FROM table_10809 WHERE "Score in the final" = '6โ€“7, 2โ€“6' AND "Partner" = 'wayne arthurs'
### Instruction: what is the number of patients whose diagnoses icd9 code is e8788? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "E8788"
### Instruction: What is the chassis of Officine Alfieri Maserati with a Maserati Straight-6 engine and fewer than 6 points? ### Response:
SELECT chassis FROM table_name_55 WHERE engine = "maserati straight-6" AND entrant = "officine alfieri maserati" AND points < 6
### Instruction: What is Score, when Country is 'United States', when Place is 'T3', and when Player is 'Phil Blackmar'? ### Response:
SELECT "Score" FROM table_62112 WHERE "Country" = 'united states' AND "Place" = 't3' AND "Player" = 'phil blackmar'
### Instruction: What were the Lyrics (l) and Music (m) for the Artist who was in a Position higher than 3 and who earned 1st Place? ### Response:
SELECT "Lyrics (l) / Music (m)" FROM table_43270 WHERE "Position" > '3' AND "Place" = '1st'
### Instruction: What is the sum of all values in Fall 09 in Allegany county with Fall 07 less than 751? ### Response:
SELECT SUM("Fall 09") FROM table_5188 WHERE "Maryland Counties" = 'allegany' AND "Fall 07" < '751'
### Instruction: provide the long title of diagnoses and short title of procedure for patient with patient id 23733. ### Response:
SELECT diagnoses.long_title, procedures.short_title FROM diagnoses INNER JOIN procedures ON diagnoses.hadm_id = procedures.hadm_id WHERE diagnoses.subject_id = "23733"
### Instruction: WHAT IS THE NUMBER OF LOSSES WITH A LONG SMALLER THAN 24, AND GAIN BIGGER THAN 116? ### Response:
SELECT COUNT("Loss") FROM table_46164 WHERE "Long" < '24' AND "Gain" > '116'
### Instruction: which of the following roller coasters is the oldest : star of lake tai , star of nanchang , melbourne star ### Response:
SELECT "name" FROM table_201_2 WHERE "name" IN ('star of lake tai', 'star of nanchang', 'melbourne star') ORDER BY "completed" LIMIT 1
### Instruction: What rank did the United States swimmer come in who posted 11.26 seconds in the 100-meter youth female division? ### Response:
SELECT COUNT("Rank") FROM table_70972 WHERE "Fastest time (s)" = '11.26' AND "Nation" = 'united states'
### Instruction: What date was the crowd larger than 16,000 people and the away team scored 8.11 (59)? ### Response:
SELECT "Date" FROM table_58137 WHERE "Crowd" > '16,000' AND "Away team score" = '8.11 (59)'
### Instruction: Find the name of the project for which a scientist whose name contains Smith is assigned to. ### Response:
SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'
### Instruction: How many patients born before the year 1837 were admitted to trsf within this facility? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.dob_year < "1837"
### Instruction: What is the least amount of severe tropical cyclones for the 1992 93 season and the tropical Lows smaller than 6? ### Response:
SELECT MIN(Severe) AS tropical_cyclones FROM table_name_61 WHERE season = "1992โ€“93" AND tropical_lows < 6
### Instruction: What are the conditions of access where access using a Croatian identity card is yes and the length of stay permitted is freedom of movement? ### Response:
SELECT "Conditions of access" FROM table_28210 WHERE "Access using a Croatian identity card" = 'Yes' AND "Length of stay permitted" = 'Freedom of movement'
### Instruction: Show the names of members and the location of the performances they attended. ### Response:
SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID
### Instruction: List all the possible ways to get to attractions, together with the number of attractions accessible by these methods Visualize by bar chart, list in desc by the bars. ### Response:
SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY How_to_Get_There DESC
### Instruction: Which Team has a Recopa 1994 of n/a and a CONMEBOL 1994 of 1st round? ### Response:
SELECT team FROM table_name_92 WHERE recopa_1994 = "n/a" AND conmebol_1994 = "1st round"
### Instruction: For those records from the products and each product's manufacturer, what is the relationship between code and manufacturer , and group by attribute founder? ### Response:
SELECT T1.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
### Instruction: Name the total water resources m3 for rainfall being 650 ### Response:
SELECT COUNT(per_capita_average_annual_renewable_water_resources_m_3) FROM table_22854436_1 WHERE average_annual_rainfall__mm_ = "650"
### Instruction: Find the number of patients with the primary disease s/p fall who died on or before 2133. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL" AND demographic.dod_year <= "2133.0"
### Instruction: What is the Qaxmu al village with a Fistiqli village ke qutan? ### Response:
SELECT "Qaxmu\u011fal" FROM table_75413 WHERE "F\u0131st\u0131ql\u0131" = 'keลŸqutan'
### Instruction: What is the subjunctive present that is associated with a plural preterite of u, a singular preterite of ou, and a singular present of ? ### Response:
SELECT subj_pres FROM table_name_78 WHERE plur_pret = "u" AND sing_pret = "ou" AND sing_pres = "รป"
### Instruction: Which game did Bruesa GBC play in with fewer than 275 rebounds that is ranked less than 4? ### Response:
SELECT SUM("Games") FROM table_52203 WHERE "Rank" < '4' AND "Rebounds" < '275' AND "Team" = 'bruesa gbc'
### Instruction: who was the next appointed director after lee p. brown ? ### Response:
SELECT "name" FROM table_203_376 WHERE "term of office" > (SELECT "term of office" FROM table_203_376 WHERE "name" = 'lee p. brown') ORDER BY "term of office" LIMIT 1
### Instruction: How many podiums had a race higher than 14 in 1996 and a Flap lower than 9? ### Response:
SELECT COUNT("Podium") FROM table_46258 WHERE "Race" > '14' AND "Season" = '1996' AND "FLap" < '9'
### Instruction: What is the average capacity of stadiums in the City of London that belong to schools with an enrollment less than 30,000? ### Response:
SELECT AVG("Capacity") FROM table_67527 WHERE "City" = 'london' AND "Enrollment" < '30,000'
### Instruction: For Saint-Paul parish, if it has an area of over 228.65 kilometers how many people live there? ### Response:
SELECT COUNT("Population") FROM table_76723 WHERE "Official Name" = 'saint-paul' AND "Area km 2" > '228.65'
### Instruction: Answered and closed, no time limit. ### Response:
SELECT COUNT(p.Id) FROM Posts AS p, PostHistory AS ph WHERE p.PostTypeId = 1 AND ph.PostHistoryTypeId = 10 AND NOT p.AcceptedAnswerId IS NULL AND p.Id = ph.PostId AND p.Score > 0
### Instruction: Return the name of the member who is in charge of the most events. ### Response:
SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: Which Silver has a Gold of 2, and a Nation of puerto rico, and a Total smaller than 12? ### Response:
SELECT SUM("Silver") FROM table_75489 WHERE "Gold" = '2' AND "Nation" = 'puerto rico' AND "Total" < '12'
### Instruction: what are the four most frequently prescribed medicines? ### Response:
SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication GROUP BY medication.drugname) AS t1 WHERE t1.c1 <= 4
### Instruction: Display a bar chart for how many products are there for each manufacturer?, could you show in descending by the Y-axis? ### Response:
SELECT T2.Name, COUNT(*) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY COUNT(*) DESC
### Instruction: What is the sum of the scottish cup of the forward player with less than 2 league cups and a total greater than 6? ### Response:
SELECT SUM("Scottish Cup") FROM table_61991 WHERE "League Cup" < '2' AND "Total" > '6' AND "Position" = 'forward'
### Instruction: which track has the same producer as the track say something ? ### Response:
SELECT "title" FROM table_203_687 WHERE "title" <> '"say something"' AND "producer(s)" = (SELECT "producer(s)" FROM table_203_687 WHERE "title" = '"say something"')
### Instruction: Provide me with the name of all the village (German) that are part of the village (Slovenian) with sele srednji kot. ### Response:
SELECT "Village (German)" FROM table_72129 WHERE "Village (Slovenian)" = 'Sele Srednji Kot'
### Instruction: what is the venue when the competition is asian games, the event is 4x400 m relay and the year is 2002? ### Response:
SELECT venue FROM table_name_93 WHERE competition = "asian games" AND event = "4x400 m relay" AND year = 2002
### Instruction: How many millions of U.S. viewers watched the episode directed by Rob Bailey and written by Pam Veasey? ### Response:
SELECT "U.S. viewers (millions)" FROM table_72318 WHERE "Directed by" = 'Rob Bailey' AND "Written by" = 'Pam Veasey'
### Instruction: what is discharge time and diagnoses long title of subject id 23602? ### Response:
SELECT demographic.dischtime, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "23602"
### Instruction: Show the names of companies and the number of employees they have ### Response:
SELECT T3.Name, COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name
### Instruction: Who was the Runner(s)-up in the race with a winning score of 67-66-65-69=267? ### Response:
SELECT runner_s__up FROM table_name_75 WHERE winning_score = 67 - 66 - 65 - 69 = 267
### Instruction: Find the number of professors with a PhD degree in each department Show bar chart, and could you display X from low to high order? ### Response:
SELECT DEPT_CODE, COUNT(*) FROM PROFESSOR WHERE PROF_HIGH_DEGREE = 'Ph.D.' GROUP BY DEPT_CODE ORDER BY DEPT_CODE
### Instruction: What was the draw for 'Feel The Pain' which placed in 2nd and had more than 79 points? ### Response:
SELECT AVG("Draw") FROM table_50797 WHERE "Place" = '2nd' AND "Song" = 'feel the pain' AND "Points" > '79'
### Instruction: What are the results in 2008 when 2009 is 0, and the ATP Tournaments Won is the tournament? ### Response:
SELECT "2008" FROM table_50388 WHERE "2009" = '0' AND "Tournament" = 'atp tournaments won'
### Instruction: What's the sum of swing to gain with a winning party 2007 of Conservative with a rank smaller than 5? ### Response:
SELECT SUM("Swing to gain") FROM table_10838 WHERE "Winning party 2007" = 'conservative' AND "Rank" < '5'
### Instruction: what is discharge time and diagnoses short title of subject name cynthia robinson? ### Response:
SELECT demographic.dischtime, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Cynthia Robinson"
### Instruction: Avg/G that has a Att-Cmp-Int of 1 1 0, and an Effic larger than 394 is what total? ### Response:
SELECT COUNT(avg_g) FROM table_name_62 WHERE att_cmp_int = "1โ€“1โ€“0" AND effic > 394
### Instruction: What tournament or series was played in England, when games played was 4, points for were 121? ### Response:
SELECT tournament_or_series FROM table_name_15 WHERE played_in = "england" AND games_played___tests__ = "4" AND points_for___tests__ = "121"
### Instruction: What is the highest kneel with a stand less than 187, and a 197 prone, and a qual more than 576? ### Response:
SELECT MAX(kneel) FROM table_name_59 WHERE stand < 187 AND prone = 197 AND qual > 576
### Instruction: what is the total number of reasons for change where the date the successor was seated is june 8, 1876? ### Response:
SELECT COUNT(reason_for_change) FROM table_2192067_4 WHERE date_successor_seated = "June 8, 1876"
### Instruction: can i have a RENTAL CAR in HOUSTON ### Response:
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'HOUSTON' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR'
### Instruction: What is the release price for a processor with part number cy80632007227ab? ### Response:
SELECT release_price___usd__ FROM table_16729930_18 WHERE part_number_s_ = "CY80632007227AB"
### Instruction: What is the highest rebound Dennis Rodman obtained within the 20 rebounds category given two of the following:points, rebounds, assists, steals, and blocked shots (points) greater equal to 5 ### Response:
SELECT MAX("20 rebounds") FROM table_3384 WHERE "Double double" = '5'
### Instruction: how many patients have gotten discharged from the hospital since 6 years ago? ### Response:
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE NOT admissions.dischtime IS NULL AND DATETIME(admissions.dischtime) >= DATETIME(CURRENT_TIME(), '-6 year')
### Instruction: What is the average rank of the movie from Paramount Studios that grossed $200,512,643? ### Response:
SELECT AVG("Rank") FROM table_44121 WHERE "Studio" = 'paramount' AND "Gross" = '$200,512,643'
### Instruction: had patient 028-40370 been admitted since 2104 in hospital? ### Response:
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '028-40370' AND STRFTIME('%y', patient.hospitaladmittime) >= '2104'
### Instruction: what is primary disease and diagnoses short title of subject id 25543? ### Response:
SELECT demographic.diagnosis, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "25543"
### Instruction: What is the Clean & jerk for the snatch less than 150 and a Bodyweight of 76.18? ### Response:
SELECT "Clean & jerk" FROM table_53481 WHERE "Snatch" < '150' AND "Bodyweight" = '76.18'
### Instruction: How many coaches does each club has? List the club id, name and the number of coaches. ### Response:
SELECT T1.club_id, T1.club_name, COUNT(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id
### Instruction: Show the authors who have submissions to more than one workshop. ### Response:
SELECT T2.author FROM acceptance AS T1 JOIN submission AS T2 ON T1.submission_id = T2.submission_id GROUP BY T2.author HAVING COUNT(DISTINCT T1.workshop_id) > 1
### Instruction: give me the number of patients whose admission type is elective and admission year is less than 2146? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admityear < "2146"
### Instruction: Find the name of students who took some course offered by Statistics department. ### Response:
SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'
### Instruction: what is the date for when the georgian name is ? ### Response:
SELECT "Date" FROM table_25012 WHERE "Georgian name" = 'แƒชแƒฎแƒแƒ•แƒ แƒ”แƒ‘แƒ แƒ“แƒ แƒฃแƒฌแƒงแƒ”แƒ‘แƒ แƒ‘แƒแƒ’แƒ แƒแƒขแƒแƒœแƒ˜แƒแƒœแƒ—แƒ'
### Instruction: What zone was the Semifinal game played against Israel with Anna Smashnova as the opponent? ### Response:
SELECT "Zone" FROM table_57661 WHERE "Round" = 'semifinal' AND "Against" = 'israel' AND "Opponent" = 'anna smashnova'
### Instruction: What was the position for mauro at the world championships in 1985 during the foil individual event? ### Response:
SELECT "Position" FROM table_39108 WHERE "Event" = 'foil individual' AND "Competition" = 'world championships' AND "Year" = '1985'
### Instruction: Name the winner for adriano baffi and integiro classification of j n svorada for stage of 13 ### Response:
SELECT winner FROM table_name_89 WHERE points_classification = "adriano baffi" AND intergiro_classification = "jรกn svorada" AND stage = "13"
### Instruction: Who is performer 2 of the episode on 9 April 1993 with Josie Lawrence as performer 4? ### Response:
SELECT "Performer 2" FROM table_36537 WHERE "Performer 4" = 'josie lawrence' AND "Date" = '9 april 1993'
### Instruction: where are some good arabic -s in mountain view ? ### Response:
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
### Instruction: Display a bar chart for what is the name of each aircraft and how many flights does each one complete?, and could you sort by the x axis in desc? ### Response:
SELECT name, COUNT(*) FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid ORDER BY name DESC
### Instruction: there are the same number of centers as what other position on the team ? ### Response:
SELECT "position" FROM table_204_140 WHERE "position" <> 'center' GROUP BY "position" HAVING COUNT(*) = (SELECT COUNT(*) FROM table_204_140 WHERE "position" = 'center')
### Instruction: For the transaction dates if share count is smaller than 10, bin the dates into the year interval, and count them using a line chart, order X from low to high order. ### Response:
SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count < 10 ORDER BY date_of_transaction
### Instruction: when is the latest to join prsl when founded in 2007 and the stadium is roberto clemente stadium 1? ### Response:
SELECT MAX(joined_prsl) FROM table_name_31 WHERE founded = 2007 AND stadium = "roberto clemente stadium 1"
### Instruction: What district is James Humphrey from who was first elected in 1858 and was eventually defeated democratic gain? ### Response:
SELECT district FROM table_name_3 WHERE first_elected = 1858 AND result = "defeated democratic gain" AND incumbent = "james humphrey"
### Instruction: What Vehicle Flight # has Pilot Peterson and Velocity (km/h) of 649? ### Response:
SELECT "Vehicle Flight #" FROM table_80138 WHERE "Pilot" = 'peterson' AND "Velocity (km/h)" = '649'
### Instruction: What Social AO has an External CO of simonas savickas, and an Internal CO of pieter kuijsten? ### Response:
SELECT "Social AO" FROM table_61958 WHERE "External CO" = 'simonas savickas' AND "Internal CO" = 'pieter kuijsten'
### Instruction: Which opponent played a 1990 wcq type of game, where the results were 0:0? ### Response:
SELECT "Opponent" FROM table_4998 WHERE "Type of game" = '1990 wcq' AND "Results\u00b9" = '0:0'
### Instruction: what is minimum age of patients whose days of hospital stay is 20 and year of death is less than 2168? ### Response:
SELECT MIN(demographic.age) FROM demographic WHERE demographic.days_stay = "20" AND demographic.dod_year < "2168.0"
### Instruction: Is EHS 869 counted towards ULCS ? ### Response:
SELECT COUNT(*) > 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'EHS' AND course.number = 869 AND program_course.category LIKE '%ULCS%'
### Instruction: what is admission time and procedure icd9 code of subject id 2560? ### Response:
SELECT demographic.admittime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560"
### Instruction: What is the total number of years did he play the forward position and what school/club/team/country of Oregon State did he play? ### Response:
SELECT SUM("No.(s)") FROM table_55473 WHERE "Position" = 'forward' AND "School/Club Team/Country" = 'oregon state'
### Instruction: What is the date of the match against John McEnroe with a Score of 3 6, 6 3, 2 6? ### Response:
SELECT date FROM table_name_73 WHERE opponent = "john mcenroe" AND score = "3โ€“6, 6โ€“3, 2โ€“6"