instruction
stringlengths
53
549
output
stringlengths
30
2.33k
### Instruction: how many female patients have lidocaine 2% prescription? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.drug = "Lidocaine 2%"
### Instruction: Which Number of households has a Median household income of $32,806, and a Population larger than 11,291? ### Response:
SELECT MAX("Number of households") FROM table_13013 WHERE "Median household income" = '$32,806' AND "Population" > '11,291'
### Instruction: among patients tested for blood gas, how many of them were aged below 59? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "59" AND lab."CATEGORY" = "Blood Gas"
### Instruction: list airports in LOS ANGELES ### Response:
SELECT DISTINCT airport.airport_code FROM airport, airport_service, city WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'LOS ANGELES'
### Instruction: What is the total number for July with less than 8.05 in October, more than 4.46 in December, and more than 6.79 in November? ### Response:
SELECT COUNT(july) FROM table_name_12 WHERE october < 8.05 AND december > 4.46 AND november > 6.79
### Instruction: Return a bar chart showing the number of documents stored in each weekday, order from high to low by the total number. ### Response:
SELECT Date_Stored, COUNT(Date_Stored) FROM All_Documents AS T1 JOIN Ref_Calendar AS T2 ON T1.Date_Stored = T2.Calendar_Date ORDER BY COUNT(Date_Stored) DESC
### Instruction: Name the Partner which is in 1979, and Opponents in the final of heinz g nthardt bob hewitt? ### Response:
SELECT partner FROM table_name_68 WHERE date = 1979 AND opponents_in_the_final = "heinz günthardt bob hewitt"
### Instruction: List of all edits where edit summary contains given keyword. ### Response:
SELECT DISTINCT PostId AS "post_link", Comment, UserId AS "user_link", CreationDate, url = 'site://posts/' + CAST(PostId AS TEXT) + '/revisions' FROM PostHistory WHERE Comment LIKE '%##keyword##%' ORDER BY CreationDate
### Instruction: Which project made the most number of outcomes? List the project details and the project id. ### Response:
SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: What is the result for the champions jeonju kcc egis with runners-up seoul samsung thunders after 2007? ### Response:
SELECT result FROM table_name_39 WHERE year > 2007 AND runners_up = "seoul samsung thunders" AND champions = "jeonju kcc egis"
### Instruction: how many married patients had the item id 51000? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.itemid = "51000"
### Instruction: Tagged with submodule and git, but not git-submodule. ### Response:
SELECT Id AS "post_link", Tags FROM Posts WHERE PostTypeId = 1 AND (Tags LIKE '%<git>%<submodule>%' OR Tags LIKE '%<submodule>%<git>%') AND NOT Tags LIKE '%<git-submodule>%' ORDER BY Tags
### Instruction: For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of hire_date and the sum of salary bin hire_date by time. ### Response:
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
### Instruction: how many of the patients aged below 50 had item id 50903? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "50" AND lab.itemid = "50903"
### Instruction: What Nation had a more than 1 Total medal including less than 3 Silver, less than 4 Gold and a Rank of 4? ### Response:
SELECT "Nation" FROM table_50461 WHERE "Silver" < '3' AND "Total" > '1' AND "Gold" < '4' AND "Rank" = '4'
### Instruction: How many 2008s have 6.9 as a 2006, with a 2007 less than 7.1? ### Response:
SELECT COUNT("2008") FROM table_61010 WHERE "2006" = '6.9' AND "2007" < '7.1'
### Instruction: what is the highest week when the date is october 6, 1975 and attendance is higher than 79,384? ### Response:
SELECT MAX("Week") FROM table_13493 WHERE "Date" = 'october 6, 1975' AND "Attendance" > '79,384'
### Instruction: how many of the patients were treated with drug gcsf480i? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "GCSF480I"
### Instruction: how many patients are admitted under clinic referral/premature and are born before 2112? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.dob_year < "2112"
### Instruction: provide the number of patients whose diagnosis short title is hy kid nos w cr kid i-iv. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Hy kid NOS w cr kid I-IV"
### Instruction: For those records from the products and each product's manufacturer, return a scatter chart about the correlation between code and revenue , and group by attribute headquarter. ### Response:
SELECT T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
### Instruction: what is diagnoses icd9 code and drug name of subject id 65652? ### Response:
SELECT diagnoses.icd9_code, prescriptions.drug FROM diagnoses INNER JOIN prescriptions ON diagnoses.hadm_id = prescriptions.hadm_id WHERE diagnoses.subject_id = "65652"
### Instruction: Median household income of $40,340, and a Number of households smaller than 64,767 is what average population? ### Response:
SELECT AVG("Population") FROM table_5310 WHERE "Median household income" = '$40,340' AND "Number of households" < '64,767'
### Instruction: Question in a given tag with my answer. ### Response:
SELECT q.Id AS "post_link", q.Score FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE (a.OwnerUserId = '##userid##') AND (q.Tags LIKE '%<##tagname##>%') ORDER BY q.Score DESC
### Instruction: Find the distinct last names of all the students who have president votes and whose advisor is not 2192. ### Response:
SELECT DISTINCT T1.lname FROM student AS T1 JOIN voting_record AS T2 ON T1.stuid = president_vote EXCEPT SELECT DISTINCT lname FROM student WHERE advisor = "2192"
### Instruction: What is the latest year for first elected with john hostettler as incumbent and a result of lost re-election democratic gain? ### Response:
SELECT MAX("First elected") FROM table_59726 WHERE "Results" = 'lost re-election democratic gain' AND "Incumbent" = 'john hostettler'
### Instruction: For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the founder , and group by attribute founder. ### Response:
SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder
### Instruction: Which record has 5:00 as the time, jess liaudin as the opponent for the location of england? ### Response:
SELECT "Record" FROM table_69939 WHERE "Time" = '5:00' AND "Opponent" = 'jess liaudin' AND "Location" = 'england'
### Instruction: What is the 2008-09 team of the player who plays the f position and has NHL rights with the New Jersey Devils? ### Response:
SELECT "2008-09 team" FROM table_41589 WHERE "Position" = 'f' AND "NHL rights, if any" = 'new jersey devils'
### Instruction: What college did the player who had the position of OT come from who was pick number less than 12 and a overall pick number bigger than 226? ### Response:
SELECT "College" FROM table_45975 WHERE "Overall" > '226' AND "Pick" < '12' AND "Position" = 'ot'
### Instruction: Which party had a result of retired democratic hold and a first elected earlier than 1884 with an incumbent of samuel dibble? ### Response:
SELECT party FROM table_name_32 WHERE result = "retired democratic hold" AND first_elected < 1884 AND incumbent = "samuel dibble"
### Instruction: which patients had continuous invasive mechanical ventilation for 96 consecutive hours or more? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Continuous invasive mechanical ventilation for 96 consecutive hours or more"
### Instruction: list the time of the hospital admission of patient 017-37716 in 2103. ### Response:
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '017-37716' AND STRFTIME('%y', patient.hospitaladmittime) = '2103'
### Instruction: What is the whenbuilt of the Brighton built Blandford Forum with a withdrawn of september 1964? ### Response:
SELECT "Whenbuilt" FROM table_32679 WHERE "Builder" = 'brighton' AND "Withdrawn" = 'september 1964' AND "Name" = 'blandford forum'
### Instruction: What is the average PUBS 11 value in Mumbai, which has a 07-11 totals less than 1025? ### Response:
SELECT AVG(pubs_2011) FROM table_name_52 WHERE location = "mumbai" AND totals_07_11 < 1025
### Instruction: What is the total of NA for set 4, a score of 3-0 and a 26-24 for set 2? ### Response:
SELECT "Total" FROM table_41982 WHERE "Set 4" = 'na' AND "Score" = '3-0' AND "Set 2" = '26-24'
### Instruction: What apartment type codes and apartment numbers do the buildings managed by 'Kyle' have? ### Response:
SELECT T2.apt_type_code, T2.apt_number FROM apartment_buildings AS T1 JOIN apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle"
### Instruction: Which Clock Speed has a FSB Speed of 400 mhz, and a Model Number of c7-m 794? ### Response:
SELECT "Clock Speed" FROM table_48329 WHERE "FSB Speed" = '400 mhz' AND "Model Number" = 'c7-m 794'
### Instruction: What position does ceri sweeney with under 87 caps of the newport gwent dragons play? ### Response:
SELECT "Position" FROM table_57980 WHERE "Club/province" = 'newport gwent dragons' AND "Caps" < '87' AND "Player" = 'ceri sweeney'
### Instruction: Name the most year for team motul brm and chassis of brm p201 and points less than 0 ### Response:
SELECT MAX("Year") FROM table_68918 WHERE "Entrant" = 'team motul brm' AND "Chassis" = 'brm p201' AND "Points" < '0'
### Instruction: What nation won the fewest gold medals while being in Rank 1, with a total of 37 medals and more than 7 bronze medals? ### Response:
SELECT MIN("Gold") FROM table_69262 WHERE "Total" = '37' AND "Rank" = '1' AND "Bronze" > '7'
### Instruction: What is the nhl team when the college, junior, club team is toronto marlboros (ohl) and the position is centre? ### Response:
SELECT nhl_team FROM table_2679061_2 WHERE college_junior_club_team = "Toronto Marlboros (OHL)" AND position = "Centre"
### Instruction: What is the Overall Record when the Last 10 Meetings is ou, 7-3, and Norman is ou, 18-3? ### Response:
SELECT overall_record FROM table_name_4 WHERE last_10_meetings = "ou, 7-3" AND at_norman = "ou, 18-3"
### Instruction: Resposta por usu rio e conte do. ### Response:
SELECT Id AS "post_link", 'owneruserid' AS "user_link" FROM Posts WHERE OwnerUserId = '##UserId##' AND Body LIKE '%##text##%' COLLATE sql_latin1_general_cp1_ci_as AND PostTypeId = 2
### Instruction: give me the number of patients whose ethnicity is black/haitian and admission year is less than 2123? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.admityear < "2123"
### Instruction: what is the name of the venue listed before olympic stadium on 1950-08-27 ? ### Response:
SELECT "venue" FROM table_204_453 WHERE id = (SELECT id FROM table_204_453 WHERE "date" = '1950-08-27') - 1
### Instruction: Show the number of documents in different starting date Bin starting date by weekday and group by location code with a stacked bar chart, display from low to high by the Y. ### Response:
SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Date_in_Location_From)
### Instruction: Find ACC_Road and the average of Team_ID , and group by attribute ACC_Road, and visualize them by a bar chart, and order by the y axis in desc. ### Response:
SELECT ACC_Road, AVG(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY AVG(Team_ID) DESC
### Instruction: datasets used in papers written by oren etzioni ? ### Response:
SELECT DISTINCT paperdataset.datasetid FROM author, paper, paperdataset, writes WHERE author.authorname = 'oren etzioni' AND paper.paperid = paperdataset.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
### Instruction: How much Grid has a Time/Retired of +1 lap, and a Driver of s bastien bourdais, and Laps larger than 70? ### Response:
SELECT COUNT(grid) FROM table_name_89 WHERE time_retired = "+1 lap" AND driver = "sébastien bourdais" AND laps > 70
### Instruction: What season has a number less than 90, Mitte as the league and spvgg ruhmannsfelden as the team? ### Response:
SELECT "Season" FROM table_75493 WHERE "Number" < '90' AND "League" = 'mitte' AND "Team" = 'spvgg ruhmannsfelden'
### Instruction: how many times did s bastien bourdais win the champ car world series between 2005 and 2007 ? ### Response:
SELECT COUNT(*) FROM table_203_99 WHERE "season" >= 2005 AND "season" <= 2007 AND "driver" = 'sebastien bourdais'
### Instruction: List the name of playlist which has number of tracks greater than 100. ### Response:
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING COUNT(T1.track_id) > 100
### Instruction: how many times do patient 3745 go to the hospital until 1 year ago. ### Response:
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 3745 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-1 year')
### Instruction: in what year did chivas have the same number of wins as in 2012 ? ### Response:
SELECT "year" FROM table_204_801 WHERE "year" <> 2012 AND "chivas" = (SELECT "chivas" FROM table_204_801 WHERE "year" = 2012)
### Instruction: Which Club has a League Cup goals of 0, and a League goals of 11, and a Scorer of joe laidlaw? ### Response:
SELECT "Club" FROM table_9695 WHERE "League Cup goals" = '0' AND "League goals" = '11' AND "Scorer" = 'joe laidlaw'
### Instruction: count the number of patients whose discharge location is disch-tran to psych hosp and age is less than 36? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND demographic.age < "36"
### Instruction: what is the number of patients with ventricular tachycardia primary disease who had home discharge? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME" AND demographic.diagnosis = "VENTRICULAR TACHYCARDIA"
### Instruction: Which Class has a Performance test of minimum value, and a Usage of semi hepa, and a Performance of 99.5%? ### Response:
SELECT "Class" FROM table_44096 WHERE "Performance test" = 'minimum value' AND "Usage" = 'semi hepa' AND "Performance" = '99.5%'
### Instruction: What's the sum of the total congregation in the manitoba province with less than 1,208,268 population? ### Response:
SELECT SUM("Total Congregations") FROM table_77363 WHERE "Province" = 'manitoba' AND "Population" < '1,208,268'
### Instruction: how many patients aged below 43 year had the drug route dialysis? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "43" AND prescriptions.route = "DIALYS"
### Instruction: What are the last names of the author of the paper titled 'Binders Unbound'? ### Response:
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = "Binders Unbound"
### Instruction: what was the difference in win percentage between john pawlowski and porter grant ? ### Response:
SELECT (SELECT "pct." FROM table_203_593 WHERE "coach" = 'john pawlowski') - (SELECT "pct." FROM table_203_593 WHERE "coach" = 'porter grant')
### Instruction: What is the to par for Paul Azinger from the United States after 1986 for a total bigger than 145? ### Response:
SELECT COUNT(to_par) FROM table_name_72 WHERE country = "united states" AND year_won > 1986 AND player = "paul azinger" AND total > 145
### Instruction: What is the total number of offensive rebounds for players with under 65 total rebounds, 5 defensive rebounds, and under 7 assists? ### Response:
SELECT COUNT("Off Reb") FROM table_75822 WHERE "Total Reb" < '65' AND "Def Reb" = '5' AND "Asst" < '7'
### Instruction: Who did the housemate that nominated Kashmera Rakhi in week 3 and Amit Bobby in week 1 nominate in week 6? ### Response:
SELECT "Week 6" FROM table_65572 WHERE "Week 3" = 'kashmera rakhi' AND "Week 1" = 'amit bobby'
### Instruction: get the number of patients who were admitted urgently with phys referral/normal deli as admission location. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admission_location = "PHYS REFERRAL/NORMAL DELI"
### Instruction: provide the number of patients whose gender is m and primary disease is posterior communicating aneurysm/sda? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA"
### Instruction: What is the minimum hydroelectricity with a less than 116.4 total, and a greater than 18.637 solar? ### Response:
SELECT MIN("Hydroelectricity") FROM table_48377 WHERE "Total" < '116.4' AND "Solar" > '18.637'
### Instruction: Which 1956 has a County of v lcea, and a 2011 smaller than 371714? ### Response:
SELECT SUM("1956") FROM table_39345 WHERE "County" = 'vâlcea' AND "2011" < '371714'
### Instruction: during this year how many patients were discharged from the hospital? ### Response:
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE NOT admissions.dischtime IS NULL AND DATETIME(admissions.dischtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
### Instruction: Which birthplace's height in inches was more than 192 when the position was d and the birthday was April 5, 1983? ### Response:
SELECT birthplace FROM table_name_70 WHERE height__in_ > 192 AND position = "d" AND birthdate = "april 5, 1983"
### Instruction: Find the name of customers who do not have a loan with a type of Mortgages. ### Response:
SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'
### Instruction: Which city does staff with first name as Janessa and last name as Sawayn live? ### Response:
SELECT T1.city FROM addresses AS T1 JOIN staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"
### Instruction: provide the number of patients who have been in the hospital for more than 29 days and whose discharge location was home health care. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE" AND demographic.days_stay > "29"
### Instruction: Which and how many tags have the questions I answered?. ### Response:
SELECT t.TagName, COUNT(t.TagName) AS Count FROM Tags AS t, PostTags AS pt, Posts AS p WHERE pt.PostId = p.ParentId AND pt.TagId = t.Id AND p.OwnerUserId = @UserId GROUP BY t.TagName ORDER BY Count DESC
### Instruction: How many crops were damaged when the public property damage was 1,03,049.60? ### Response:
SELECT "Crop Damaged (in Lakh INR )" FROM table_23711 WHERE "Public Property Damaged (in Lakh INR )" = '1,03,049.60'
### Instruction: how many patients are diagnosed with icd9 code 9600 and suggested the additive drug type? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.admityear < "2156"
### Instruction: Return a bar chart about the distribution of meter_200 and the sum of meter_100 , and group by attribute meter_200, display Y-axis in asc order. ### Response:
SELECT meter_200, SUM(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY SUM(meter_100)
### Instruction: Return a bar chart showing how many members have visited for each college, sort from low to high by the X-axis. ### Response:
SELECT T1.Name, COUNT(T1.Name) FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID GROUP BY T1.Name ORDER BY T1.Name
### Instruction: Show the names of products and the number of events they are in, sorted by the number of events in descending order. ### Response:
SELECT T1.product_name, COUNT(*) FROM products AS T1 JOIN products_in_events AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC
### Instruction: What is the Place of the Player with a To par of 10 and a Score of 67-67-66=200? ### Response:
SELECT "Place" FROM table_59981 WHERE "To par" = '–10' AND "Score" = '67-67-66=200'
### Instruction: does m90 have a higher or lower apparent magnitude than m63 ? ### Response:
SELECT (SELECT "apparent magnitude" FROM table_203_569 WHERE "designation" = 'm90') > (SELECT "apparent magnitude" FROM table_203_569 WHERE "designation" = 'm63')
### Instruction: Which Population is the highest one that has an Altitude (mslm) smaller than 229, and an Area (km 2) larger than 32.7? ### Response:
SELECT MAX(population) FROM table_name_19 WHERE altitude__mslm_ < 229 AND area__km_2__ > 32.7
### Instruction: What is the weekly rank of the episode with a 14 share whose original airdate was April 20, 2010? ### Response:
SELECT weekly_rank FROM table_25391981_20 WHERE share = "14" AND original_airdate = "April 20, 2010"
### Instruction: what is the number of patients whose drug name is metformin (glucophage)? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "MetFORMIN (Glucophage)"
### Instruction: Name the air date for the seasons before 14 and series less than 183 with production code more than 709 ### Response:
SELECT "Original air date" FROM table_53531 WHERE "Season #" < '14' AND "Production code" > '709' AND "Series #" < '183'
### Instruction: Who was the lead with John Shuster as skip, Chris Plys in second, and Jeff Isaacson in third? ### Response:
SELECT "Lead" FROM table_77327 WHERE "Skip" = 'john shuster' AND "Third" = 'jeff isaacson' AND "Second" = 'chris plys'
### Instruction: who is the player for the position defence and the college/junior/club team is ottawa 67's (ohl)? ### Response:
SELECT "Player" FROM table_29006 WHERE "Position" = 'Defence' AND "College/junior/club team" = 'Ottawa 67''s (OHL)'
### Instruction: For those records from the products and each product's manufacturer, visualize a scatter chart about the correlation between code and price , and group by attribute headquarter. ### Response:
SELECT T1.Code, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
### Instruction: Count the number of games taken place in park 'Columbia Park' in 1907. ### Response:
SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park'
### Instruction: Users accusing other users of plagiarism (double-sigh). ### Response:
SELECT c.PostId AS "post_link", c.Text FROM Comments AS c WHERE c.Text LIKE '%http%plagiari%e%http%' OR c.Text LIKE '%http%cop%http%' OR c.Text LIKE '%http%stole%http%'
### Instruction: how many patients have undergone venous catheterization procedure and are not classified elsewhere? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Venous catheterization, not elsewhere classified"
### Instruction: What is the average number of laps with an accident time/retired, aprilia manufacturer and a grid of 27? ### Response:
SELECT AVG("Laps") FROM table_77257 WHERE "Time/Retired" = 'accident' AND "Manufacturer" = 'aprilia' AND "Grid" = '27'
### Instruction: count the number of patients less than 44 years who take drug via nu route. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "44" AND prescriptions.route = "NU"
### Instruction: If the event was bantamweight (-63kg), and the quarterfinals did not advance, then who was in round of 32? ### Response:
SELECT round_of_32 FROM table_26335424_86 WHERE quarterfinals = "Did not advance" AND event = "Bantamweight (-63kg)"
### Instruction: Which Rank has an Attendance larger than 24,102, and a Date of september 15, 2012? ### Response:
SELECT "Rank" FROM table_13873 WHERE "Attendance" > '24,102' AND "Date" = 'september 15, 2012'
### Instruction: report the number of patients who had hemoglobin lab test and are still alive. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.expire_flag = "0" AND lab.label = "Hemoglobin"
### Instruction: For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of founder and the sum of revenue , and group by attribute founder. ### Response:
SELECT Founder, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
### Instruction: Who was the semi-final television commentator when the spokesperson was Colin Berry and the final television commentator was Pete Murray? ### Response:
SELECT "Semi-final television commentator" FROM table_21902 WHERE "Spokesperson" = 'Colin Berry' AND "Final television commentator" = 'Pete Murray'