instruction
stringlengths
53
549
output
stringlengths
30
2.33k
### Instruction: What is the full number of Total Seats with a constituency seat number bigger than 0 with the Liberal Democrat party, and the Regional seat number is smaller than 6? ### Response:
SELECT SUM(total_seats) FROM table_name_26 WHERE constituency_seats > 0 AND party = "liberal democrat" AND regional_seats < 6
### Instruction: What was the total purse in the years after 1996 with a score of 272 (-16) when frank nobilo won? ### Response:
SELECT SUM(purse___) AS $__ FROM table_name_27 WHERE score = "272 (-16)" AND winner = "frank nobilo" AND year > 1996
### Instruction: How many businesses has Michelle reviewed in 2010 ? ### Response:
SELECT COUNT(DISTINCT (business.name)) FROM business, review, user WHERE review.business_id = business.business_id AND review.year = 2010 AND user.name = 'Michelle' AND user.user_id = review.user_id
### Instruction: what are all the flights into ATLANTA 's airport ### Response:
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight.to_airport = airport_service.airport_code
### Instruction: dyslipidemia, including triglycerides > 800 mg / dl, ldl > 200 mg / dl ### Response:
SELECT * FROM table_dev_20 WHERE dyslipidemia = 1 OR (triglyceride_tg > 800 OR ldl > 200)
### Instruction: how many patients having the procedure title other bronchoscopy were divorced? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "DIVORCED" AND procedures.short_title = "Other bronchoscopy"
### Instruction: Top 5000 users from Roorkee. ### Response:
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%roorkee%' OR UPPER(Location) LIKE '%ROORKEE' ORDER BY Reputation DESC LIMIT 5000
### Instruction: count the number of patients whose admission location is transfer from hosp/extram and days of hospital stay is greater than 26? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.days_stay > "26"
### Instruction: how many patients were admitted in emergency primarily for brain mass; intracranial hemorrhage ? ### Response:
SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE"
### Instruction: What is the highest Cycle, when the Number of Constestants is 11, and when Premiere Date is September 3, 2012? ### Response:
SELECT MAX(cycle) FROM table_name_57 WHERE number_of_contestants = "11" AND premiere_date = "september 3, 2012"
### Instruction: what are patient 017-13959 hospital admission times since 5 years ago? ### Response:
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '017-13959' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-5 year')
### Instruction: Provide the number of self pay insurance patients who had vitamin b12 lab tests. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Self Pay" AND lab.label = "Vitamin B12"
### Instruction: How many consecutive starts for the linebacker who played from 9/21/1975 12/16/1984? ### Response:
SELECT MAX(total) FROM table_28606933_7 WHERE period = "9/21/1975 – 12/16/1984"
### Instruction: Who is the lites 2 race two winning team when #11 Performance Tech is the lites 1 race two winning team? ### Response:
SELECT lites_2_race_two_winning_team FROM table_26638600_3 WHERE lites_1_race_two_winning_team = "#11 Performance Tech"
### Instruction: Top 50000 Users by Reputation. ### Response:
SELECT Users.Id, DisplayName, Reputation, COUNT(Posts.Id) AS Answers FROM Posts INNER JOIN Users ON Users.Id = OwnerUserId WHERE PostTypeId = 2 GROUP BY Users.Id, DisplayName, Reputation ORDER BY Reputation DESC LIMIT 50000
### Instruction: Who won volleyball when west holmes won basketball and wooster won swimming in 2011-12 ### Response:
SELECT "Volleyball" FROM table_20796 WHERE "Basketball" = 'West Holmes' AND "Swimming" = 'Wooster' AND "School Year" = '2011-12'
### Instruction: What is the 2009 when there's 11.8 in 2005 and less than 12.6 in 2006? ### Response:
SELECT MIN(2009) FROM table_name_45 WHERE 2005 = 11.8 AND 2006 < 12.6
### Instruction: is oregon route 69 newer than oregon route 90 ? ### Response:
SELECT (SELECT "formed" FROM table_204_178 WHERE "number" = 'oregon route 69') > (SELECT "formed" FROM table_204_178 WHERE "number" = 'oregon route 90')
### Instruction: What is the total number of winners when the team classification leader was Kelme-Costa Blanca and the combativity award was won by Jacky Durand? ### Response:
SELECT COUNT("Winner") FROM table_25228 WHERE "Team classification" = 'Kelme-Costa Blanca' AND "Combativity award" = 'Jacky Durand'
### Instruction: What is the average of credit value of courses with more than one prerequisite for each title? Return a bar chart, display Y in asc order. ### Response:
SELECT title, AVG(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY title ORDER BY AVG(credits)
### Instruction: let me know the type of admission and short title of diagnoses for the patient with patient id 2560. ### Response:
SELECT demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "2560"
### Instruction: How many government insurance patients had an incision of aorta procedure? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Incision of aorta"
### Instruction: Name the total number of party for willis alston (j) 93.9% george e. spruill 6.1% ### Response:
SELECT COUNT(party) FROM table_2668243_18 WHERE candidates = "Willis Alston (J) 93.9% George E. Spruill 6.1%"
### Instruction: Who are the customers that had more than 1 policy? List the customer details and id. ### Response:
SELECT T1.customer_details, T1.Customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.Customer_id HAVING COUNT(*) > 1
### Instruction: how many of the patients admitted or transfer from hosp/extram were dead or expired on discharge? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.discharge_location = "DEAD/EXPIRED"
### Instruction: calculate the number of patients who have been prescribed magnesium sulfate (ob). ### Response:
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'magnesium sulfate (ob)')
### Instruction: Which party has a first elected of 1966, qld as the state, and donald milner cameron as the member? ### Response:
SELECT "Party" FROM table_6781 WHERE "First elected" = '1966' AND "State" = 'qld' AND "Member" = 'donald milner cameron'
### Instruction: how many fewer maps were present between the 1986 and 1983 editions ? ### Response:
SELECT ABS((SELECT "maps" FROM table_204_843 WHERE "year" = 1986) - (SELECT "maps" FROM table_204_843 WHERE "year" = 1983))
### Instruction: What is the number of patients less than 79 years who had an other body fluid lab test done? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "79" AND lab.fluid = "Other Body Fluid"
### Instruction: What are all the 100 m group (mm) with a .308 winchester cartridge type of .300 winchester magnum cartridge type ### Response:
SELECT "100 m group (mm)" FROM table_17502 WHERE ".308 Winchester cartridge type" = '.300 Winchester Magnum cartridge type'
### Instruction: What is the Tonnage that has builder AG Vulcan, and the original operator NDL, and the ship, Prinzess Irene? ### Response:
SELECT "Tonnage" FROM table_59613 WHERE "Builder" = 'ag vulcan' AND "Original Operator" = 'ndl' AND "Ship" = 'prinzess irene'
### Instruction: What are the number of the names of all the Japanese constructors that have earned more than 5 points? ### Response:
SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name
### Instruction: What is a report for a race with Baconin Borzacchini in Tripoli in a year after 1928? ### Response:
SELECT "Report" FROM table_58102 WHERE "Location" = 'tripoli' AND "Year" > '1928' AND "Driver" = 'baconin borzacchini'
### Instruction: What is the Club that has an Established more than 2000 for soccer plated in kuntz stadium? ### Response:
SELECT "Club" FROM table_7654 WHERE "Established" > '2000' AND "Sport" = 'soccer' AND "Venue" = 'kuntz stadium'
### Instruction: A bar chart about what are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?, list y-axis in asc order. ### Response:
SELECT Affiliation, SUM(Enrollment) FROM university WHERE Founded > 1850 GROUP BY Affiliation ORDER BY SUM(Enrollment)
### Instruction: How many female students live in Smith Hall? ### Response:
SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'
### Instruction: when did patient 58932 have a last procedure? ### Response:
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 58932) ORDER BY procedures_icd.charttime DESC LIMIT 1
### Instruction: first deep learning paper ### Response:
SELECT DISTINCT paper.year FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'deep learning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.year ORDER BY paper.year
### Instruction: Number of downvotes by answer score. ### Response:
SELECT p.Score AS "score", COUNT(v.Id) AS "downvotes" FROM Votes AS v INNER JOIN Posts AS p ON p.Id = v.PostId WHERE p.PostTypeId = 2 AND v.VoteTypeId = 3 GROUP BY p.Score ORDER BY p.Score
### Instruction: when did the last hospital admission time that patient 5395 had been admitted via phys referral/normal deli? ### Response:
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 5395 AND admissions.admission_location = 'phys referral/normal deli' ORDER BY admissions.admittime DESC LIMIT 1
### Instruction: how much does it cost to check for bacteremia - gram postive coccus? ### Response:
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'bacteremia - gram postive coccus')
### Instruction: Use a scatter chart to show the correlation between all the faculty members who participated in some activity and the number of activities they participated in. ### Response:
SELECT COUNT(*), T1.FacID FROM Faculty AS T1 JOIN Faculty_Participates_in AS T2 ON T1.FacID = T2.FacID GROUP BY T1.FacID
### Instruction: Who from your location is better than you?. ### Response:
SELECT U2.* FROM Users AS U1 JOIN Users AS U2 ON U1.Location = U2.Location WHERE 1 = 1 AND U1.DisplayName = 'jyparask' AND U1.Reputation <= U2.Reputation ORDER BY U2.Reputation DESC, U2.DisplayName
### Instruction: how many english speaking patients had closure of skin and subcutaneous tissue of other sites? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.language = "ENGL" AND procedures.short_title = "Skin closure NEC"
### Instruction: return me the paper by ' H. V. Jagadish ' with more than 200 citations . ### Response:
SELECT publication.title FROM author, publication, writes WHERE author.name = 'H. V. Jagadish' AND publication.citation_num > 200 AND writes.aid = author.aid AND writes.pid = publication.pid
### Instruction: During the championship where the winning score was 9 (66-69-73-71=279)?, who was the runner-up? ### Response:
SELECT "Runner(s)-up" FROM table_46565 WHERE "Winning score" = 'βˆ’9 (66-69-73-71=279)'
### Instruction: find the number of patients born before 2087 who were discharged to skilled nursing facility. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.dob_year < "2087"
### Instruction: find the number of black african /american patients who had mesentric ischemia. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.diagnosis = "MESENTERIC ISCHEMIA"
### Instruction: how many patients stayed in hospital for more than 2 days and tested with pleural fluid in lab? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "2" AND lab.fluid = "Pleural"
### Instruction: Which Date has a Game smaller than 4, and an Opponent of calgary flames, and a Score of 4 5? ### Response:
SELECT "Date" FROM table_75254 WHERE "Game" < '4' AND "Opponent" = 'calgary flames' AND "Score" = '4–5'
### Instruction: give me the number of patients whose ethnicity is american indian/alaska native and age is less than 31? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.age < "31"
### Instruction: Draw a bar chart for what is the average rating star for each reviewer?, sort y axis in desc order please. ### Response:
SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY AVG(T1.stars) DESC
### Instruction: What is the country that has the format of cd, the label of sony music and the catalogue no sicp-2055? ### Response:
SELECT "Country" FROM table_63086 WHERE "Format" = 'cd' AND "Label" = 'sony music' AND "Catalogue No." = 'sicp-2055'
### Instruction: have patient 006-122712 been admitted to an emergency room during their current hospital visit. ### Response:
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '006-122712' AND patient.hospitaladmitsource = 'emergency department' AND patient.hospitaldischargetime IS NULL
### Instruction: List papers that has keyword Temporal Correlation ### Response:
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Temporal Correlation' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid
### Instruction: Which tests have 'Pass' results? Return the dates when the tests were taken, and count them by a bar chart, and order y-axis in ascending order. ### Response:
SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" ORDER BY COUNT(date_test_taken)
### Instruction: how many patients whose gender is m and procedure icd9 code is 3771? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.icd9_code = "3771"
### Instruction: what is the difference in touchdowns between raymond philyaw and jerel myers ? ### Response:
SELECT ABS((SELECT "td's" FROM table_203_8 WHERE "player" = 'raymond philyaw') - (SELECT "td's" FROM table_203_8 WHERE "player" = 'jerel myers'))
### Instruction: Find the average age and experience working length of journalists working on different role type. ### Response:
SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type
### Instruction: how many more locks does caledonian canal have compared to aberdeenshire canal ? ### Response:
SELECT (SELECT "locks" FROM table_203_594 WHERE "canal" = 'caledonian canal') - (SELECT "locks" FROM table_203_594 WHERE "canal" = 'aberdeenshire canal')
### Instruction: What are the names of all the physicians who took appointments, and count them by a bar chart, and I want to show in desc by the the number of name. ### Response:
SELECT Name, COUNT(Name) FROM Appointment AS T1 JOIN Physician AS T2 ON T1.Physician = T2.EmployeeID GROUP BY Name ORDER BY COUNT(Name) DESC
### Instruction: How much Body Width/mm has a Part Number of tsop40/44, and a Body Length/mm smaller than 18.42? ### Response:
SELECT SUM(body_width_mm) FROM table_name_66 WHERE part_number = "tsop40/44" AND body_length_mm < 18.42
### Instruction: how many patients whose primary disease is gastrointestinal bleed and admission year is less than 2115? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "GASTROINTESTINAL BLEED" AND demographic.admityear < "2115"
### Instruction: what is the difference in the capacity between penydarren park and hand stadium ? ### Response:
SELECT ABS((SELECT "capacity" FROM table_204_750 WHERE "stadium" = 'penydarren park') - (SELECT "capacity" FROM table_204_750 WHERE "stadium" = 'hand stadium'))
### Instruction: Show me a bar chart for what are the first names and support rep ids for employees serving 10 or more customers?, display by the x-axis in descending please. ### Response:
SELECT T1.FirstName, T1.SupportRepId FROM Customer AS T1 JOIN Employee AS T2 ON T1.SupportRepId = T2.EmployeeId ORDER BY T1.FirstName DESC
### Instruction: what is the number of patients who stayed in ward 483 this year? ### Response:
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 483 AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
### Instruction: how many days has it elapsed since patient 9964 was admitted to the hospital? ### Response:
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 9964 AND admissions.dischtime IS NULL
### Instruction: How many patients were admitted to clinic referral (premature) before the year 2114? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.admityear < "2114"
### Instruction: What are the wines that have prices lower than 50 and have appelations in Monterey county? ### Response:
SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50
### Instruction: Where did Carolyn Dawn Johnson win Female Artist of the Year, and Paul Brandt win Male Artist of the Year? ### Response:
SELECT "Location" FROM table_32418 WHERE "Female Artist of the Year" = 'carolyn dawn johnson' AND "Male Artist of the Year" = 'paul brandt'
### Instruction: What year had a score of 6 7(5), 2 6 and opponent of Brenda Schultz-Mccarthy? ### Response:
SELECT year FROM table_name_96 WHERE opponent_in_the_final = "brenda schultz-mccarthy" AND score = "6–7(5), 2–6"
### Instruction: Where was the place of birth for the delegate who took office after 1982, delegates a district smaller than 43 and belongs to a Health and Government operations committee? ### Response:
SELECT place_of_birth FROM table_name_31 WHERE took_office > 1982 AND district < 43 AND committee = "health and government operations"
### Instruction: How many years had a 100 m hurdles event at the world championships in Osaka, Japan? ### Response:
SELECT SUM("Year") FROM table_60746 WHERE "Event" = '100 m hurdles' AND "Competition" = 'world championships' AND "Venue" = 'osaka, japan'
### Instruction: Which season led to a position of 13, and a head coach of Protasov Lyutyi Talalayev Balakhnin Baidachny? ### Response:
SELECT season FROM table_name_24 WHERE pos = 13 AND head_coach = "protasov lyutyi talalayev balakhnin baidachny"
### Instruction: Show me about the distribution of meter_200 and the average of meter_100 , and group by attribute meter_200 in a bar chart, rank by the bars in descending please. ### Response:
SELECT meter_200, AVG(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 DESC
### Instruction: how many patients are with admission location clinic referral/premature and discharged to snf? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.discharge_location = "SNF"
### Instruction: A bar chart about what are the names of climbers and the corresponding heights of the mountains that they climb?, rank from low to high by the X-axis. ### Response:
SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Name
### Instruction: When are the birthdays of customer who are classified as 'Good Customer' status, and count them by a line chart, and show from low to high by the X-axis please. ### Response:
SELECT date_of_birth, COUNT(date_of_birth) FROM Customers WHERE customer_status_code = 'Good Customer' ORDER BY date_of_birth
### Instruction: Name The Title which has a Track number of 07, and a Record label of emi on 21 april 2006? ### Response:
SELECT "Title" FROM table_43807 WHERE "Track number" = '07' AND "Record label" = 'emi' AND "Release date" = '21 april 2006'
### Instruction: What score has a to par greater than 15, money ($) greater than 116, with billy burke as the player? ### Response:
SELECT "Score" FROM table_62579 WHERE "To par" > '15' AND "Money ( $ )" > '116' AND "Player" = 'billy burke'
### Instruction: Which FA Cup is the highest one that has a Malaysia Cup of 0, and a Player of ahmad fouzee masuri, and a Total larger than 0? ### Response:
SELECT MAX(fa_cup) FROM table_name_25 WHERE malaysia_cup = 0 AND player = "ahmad fouzee masuri" AND total > 0
### Instruction: Who owns the item that was a T326 before conversion and re-entered service on 11 September 1985? ### Response:
SELECT "Owner" FROM table_34836 WHERE "Re-entered service (P)" = '11 september 1985' AND "Pre-conversion" = 't326'
### Instruction: show me all flights from INDIANAPOLIS ### Response:
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'INDIANAPOLIS' AND flight.from_airport = airport_service.airport_code
### Instruction: Give the number of patients whose ethnicity is Hispanic or Latino and were born before the year 1850. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND demographic.dob_year < "1850"
### Instruction: Find the number of papers published by the institution 'University of Pennsylvania'. ### Response:
SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Pennsylvania"
### Instruction: What is the highest rank for gene littler with under 3 wins and under $962,133? ### Response:
SELECT MAX("Rank") FROM table_56198 WHERE "Earnings( $ )" < '962,133' AND "Player" = 'gene littler' AND "Wins" < '3'
### Instruction: Count the number of married patients who had a wbc pleural lab test done. ### 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.label = "WBC, Pleural"
### Instruction: Questions with no answers and no activity for 6 months.. ### Response:
SELECT q.Id AS "post_link", q.AnswerCount AS Answers FROM Posts AS q WHERE q.LastActivityDate < '2011-05-06' AND q.ViewCount <= 100 AND q.PostTypeId = 1 ORDER BY Score DESC
### Instruction: Which Venue that has an Attendance larger than 1,000, and a Result of scotland 12-20 samoa? ### Response:
SELECT "Venue" FROM table_60020 WHERE "Attendance" > '1,000' AND "Result" = 'scotland 12-20 samoa'
### Instruction: What is the sum of matches played that has a year of first match before 2000, fewer than 21 lost, and 0 drawn? ### Response:
SELECT SUM("Played") FROM table_69759 WHERE "First game" < '2000' AND "Lost" < '21' AND "Drawn" < '0'
### Instruction: What is the total number of losses with less than 73 goals for, less than 11 wins, more than 24 points, and a position greater than 15? ### Response:
SELECT COUNT(losses) FROM table_name_54 WHERE goals_for < 73 AND wins < 11 AND points > 24 AND position > 15
### Instruction: What is the document type name for the document with name 'How to read a book'? ### Response:
SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = "How to read a book"
### Instruction: Was the Grand Prix Watkins GLen that Miles Collier raced in before 1952 a championship? ### Response:
SELECT "Championship" FROM table_62338 WHERE "Year" < '1952' AND "Race Title" = 'grand prix watkins glen' AND "Drivers" = 'miles collier'
### Instruction: how many patients whose age is less than 31 and lab test category is hematology? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "31" AND lab."CATEGORY" = "Hematology"
### Instruction: Can you tell me the total number of Played that has the Position larger than 5, and the Points of 11, and the Drawn smaller than 1? ### Response:
SELECT COUNT("Played") FROM table_48742 WHERE "Position" > '5' AND "Points" = '11' AND "Drawn" < '1'
### Instruction: What is the total series numbers that is directed by Jefferson Kibbee and has a production code of 2398191? ### Response:
SELECT SUM("No. in series") FROM table_56140 WHERE "Director" = 'jefferson kibbee' AND "Production code" = '2398191'
### Instruction: how many patients younger than 27 years have meropenem prescription? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "27" AND prescriptions.drug = "Meropenem"
### Instruction: How many goals for where there when draws are less than 11, points of is 54+16 and goals against are less than 39? ### Response:
SELECT COUNT(goals_for) FROM table_name_66 WHERE draws < 11 AND points = "54+16" AND goals_against < 39
### Instruction: What is the sum of skin depth with a resistivity of 1.12 and a relative permeability larger than 1? ### Response:
SELECT SUM(skin_depth), _inches FROM table_name_30 WHERE resistivity__10_βˆ’6_ohm_inches_ = 1.12 AND relative_permeability > 1
### Instruction: which other team 's stadium has the same capacity as didcot town 's stadium ? ### Response:
SELECT "stadium" FROM table_204_750 WHERE "team" <> 'didcot town' AND "capacity" = (SELECT "capacity" FROM table_204_750 WHERE "team" = 'didcot town')