instruction
stringlengths
53
549
output
stringlengths
30
2.33k
### Instruction: How many people attended the game when the away team was dynamo kyiv, and a Home team of torpedo zaporizhia? ### Response:
SELECT "Attendance" FROM table_71349 WHERE "Away team" = 'dynamo kyiv' AND "Home team" = 'torpedo zaporizhia'
### Instruction: What are the different names of all songs without back vocals? ### Response:
SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE type = "back"
### Instruction: what is the number of patients whose primary disease is celo-vessicle fistula and age is less than 83? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CELO-VESSICLE FISTULA" AND demographic.age < "83"
### Instruction: What is the margin of victory for the winning score of 10 (71-65-68-70=274)? ### Response:
SELECT margin_of_victory FROM table_name_78 WHERE winning_score = −10(71 - 65 - 68 - 70 = 274)
### Instruction: what is maximum age of patients whose marital status is married and admission location is clinic referral/premature? ### Response:
SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admission_location = "CLINIC REFERRAL/PREMATURE"
### Instruction: For those records from the products and each product's manufacturer, visualize the relationship between manufacturer and code , and group by attribute headquarter. ### Response:
SELECT T1.Manufacturer, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
### Instruction: Which Home team has a Year of 2002/03, and a Venue of tahnoun bin mohamed stadium? ### Response:
SELECT "Home team" FROM table_4532 WHERE "Year" = '2002/03' AND "Venue" = 'tahnoun bin mohamed stadium'
### Instruction: how many times patient 28910 has come to the hospital since 2104? ### Response:
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 28910 AND STRFTIME('%y', admissions.admittime) >= '2104'
### Instruction: What's the directx of the model with code name RV770 PRO and a core bigger than 650.0 MHz? ### Response:
SELECT "DirectX" FROM table_22858 WHERE "Code name" = 'RV770 PRO' AND "Core ( MHz )" > '650.0'
### Instruction: give me the number of patients whose procedure short title is opn lft hemicolectmy nec? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Opn lft hemicolectmy NEC"
### Instruction: Which qualifying 1 time has a best under 58.669 and a qualifying 2 time under 57.897? ### Response:
SELECT "Qual 1" FROM table_38484 WHERE "Best" < '58.669' AND "Qual 2" < '57.897'
### Instruction: how many times is the country united states and the score 72-71-73-73=289? ### Response:
SELECT COUNT("To par") FROM table_49970 WHERE "Country" = 'united states' AND "Score" = '72-71-73-73=289'
### Instruction: Which Touchdowns is the lowest one that has Extra points smaller than 14, and a Player of white, and Points smaller than 5? ### Response:
SELECT MIN("Touchdowns") FROM table_38932 WHERE "Extra points" < '14' AND "Player" = 'white' AND "Points" < '5'
### Instruction: after lance armstrong , who led next in the 1995 tour de france ? ### Response:
SELECT "winner" FROM table_203_475 WHERE "date" > (SELECT "date" FROM table_203_475 WHERE "winner" = 'lance armstrong') ORDER BY "date" LIMIT 1
### Instruction: Cowansville has less than 16 regions and is a Brome-Missisquoi Municipality, what is their population? ### Response:
SELECT MIN(population) FROM table_name_38 WHERE regional_county_municipality = "brome-missisquoi" AND name = "cowansville" AND region < 16
### Instruction: For those records from the products and each product's manufacturer, give me the comparison about price over the name , and group by attribute founder. ### Response:
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name
### Instruction: How many floors were there with a building rank of less than 3 and a height of 300 / 985 m (ft)? ### Response:
SELECT COUNT("Floors") FROM table_36690 WHERE "Height* m (ft)" = '300 / 985' AND "Rank" < '3'
### Instruction: Name the average 3rd place with winners of 0, 4th place of 0 and nation of pahang fa ### Response:
SELECT AVG("3rd Place") FROM table_79792 WHERE "Winners" = '0' AND "4th Place" = '0' AND "Nation" = 'pahang fa'
### Instruction: Who is the current champion for the event in Beverly, MA, with previous champions of Mike Webb and Nick Fahrenheit? ### Response:
SELECT "Current champion(s)" FROM table_40105 WHERE "Location" = 'beverly, ma' AND "Previous champion(s)" = 'mike webb and nick fahrenheit'
### Instruction: what is average age of patients whose primary disease is copd exacerbation and year of death is less than 2158? ### Response:
SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "COPD EXACERBATION" AND demographic.dod_year < "2158.0"
### Instruction: Show the name for regions and the number of storms for each region by a bar chart, display in ascending by the X-axis. ### Response:
SELECT Region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.Region_id = T2.Region_id GROUP BY T1.Region_id ORDER BY Region_name
### Instruction: how long was it between the release of the furrowed field and songs ? ### Response:
SELECT ABS((SELECT "year" FROM table_204_268 WHERE "album/single" = 'the furrowed field') - (SELECT "year" FROM table_204_268 WHERE "album/single" = 'songs'))
### Instruction: Show the average of account details for different statement details in a bar chart, and sort bar in descending order. ### Response:
SELECT Statement_Details, AVG(Account_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY Statement_Details DESC
### Instruction: What is the Region of the EMI 4 x vinyl release bearing Catalog number 560 6111? ### Response:
SELECT "Region" FROM table_62644 WHERE "Label" = 'emi' AND "Format" = '4 x vinyl' AND "Catalog number" = '560 6111'
### Instruction: For those records from the products and each product's manufacturer, draw a scatter chart about the correlation 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: For those records from the products and each product's manufacturer, show me about the correlation between price and revenue , and group by attribute name in a scatter chart. ### Response:
SELECT T1.Price, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name
### Instruction: Will CMBIOL 681 count towards the ULCS ? ### Response:
SELECT COUNT(*) > 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'CMBIOL' AND course.number = 681 AND program_course.category LIKE '%ULCS%'
### Instruction: Which sport was held in Huntsville at the Von Braun Center as part of the Southern Indoor Football League? ### Response:
SELECT "Sport" FROM table_76701 WHERE "City" = 'huntsville' AND "Venue" = 'von braun center' AND "League" = 'southern indoor football league'
### Instruction: How many compound names list a chemical class of depsipeptide and a clinical trials value of 1/7? ### Response:
SELECT COUNT(compound_name) FROM table_12715053_1 WHERE chemical_class = "Depsipeptide" AND clinical_trials_β = "1/7"
### Instruction: Bring the number of patients who had laryngoscopy and other tracheoscopy procedures. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Laryngoscopy and other tracheoscopy"
### Instruction: Top Indian users in StackOverFlow. ### Response:
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%india%' OR UPPER(Location) LIKE '%INDIA%' AND Reputation >= 5000 ORDER BY Reputation DESC
### Instruction: Which Year Joined has a Size larger than 93, and a Previous Conference of none (new school), and a Mascot of rebels? ### Response:
SELECT AVG(year_joined) FROM table_name_88 WHERE size > 93 AND previous_conference = "none (new school)" AND mascot = "rebels"
### Instruction: What is the lowest expenditures on R&D for Poland after 2011? ### Response:
SELECT MIN("Expenditures on R&D (billions of US$ , PPP )") FROM table_63615 WHERE "Country/Region" = 'poland' AND "Year" > '2011'
### Instruction: Which party won in 2003, that had a swing to gain of less than 2.92 and which resulted in a ld hold? ### Response:
SELECT "Winning party 2003" FROM table_53451 WHERE "Swing to gain" < '2.92' AND "Result" = 'ld hold'
### Instruction: how many patients whose age is less than 47 and lab test fluid is joint fluid? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "47" AND lab.fluid = "Joint Fluid"
### Instruction: What is the number of movies that ' Brad Pitt ' acts in per year ? ### Response:
SELECT COUNT(DISTINCT (movie.title)), movie.release_year FROM actor, cast, movie WHERE actor.name = 'Brad Pitt' AND cast.aid = actor.aid AND movie.mid = cast.msid GROUP BY movie.release_year
### Instruction: Which Scores by each individual judge has a Date performed of august 7, and a Main contestant of karanvir bohra? ### Response:
SELECT scores_by_each_individual_judge FROM table_name_87 WHERE date_performed = "august 7" AND main_contestant = "karanvir bohra"
### Instruction: ashleedawg's animated gif's as html. ### Response:
SELECT * FROM Posts WHERE Body LIKE '%http://couill.art/wp-content/uploads/2018/05/Thicc-girls-slim-boi.gif%' AND YEAR(CreationDate) = 2018
### Instruction: do the usa rifles on average weigh more or less than the danish rifles ? ### Response:
SELECT (SELECT AVG("weight") FROM table_204_343 WHERE "nation" = 'usa') > (SELECT AVG("weight") FROM table_204_343 WHERE "nation" = 'denmark')
### Instruction: Name the total number of frequency Mhz with class of d and call sign of k201bm and ERP W less than 74 ### Response:
SELECT COUNT(frequency_mhz) FROM table_name_54 WHERE class = "d" AND call_sign = "k201bm" AND erp_w < 74
### Instruction: which election had seat no 1 filled by jacques lachapelle but seat no 5 was filled by g. sanscartier ### Response:
SELECT "Election" FROM table_73372 WHERE "Seat no 1" = 'Jacques Lachapelle' AND "Seat no 5" = 'G. Sanscartier'
### Instruction: how many patients have been prescribed the drug with code hald5i? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "HALD5I"
### Instruction: What's the description of the buttonholer whose singer part number is 121795 kit 121908 buttonholer? ### Response:
SELECT "Description" FROM table_74301 WHERE "Singer part number" = '121795 kit 121908 buttonholer'
### Instruction: What is the greatest number of points that has a lost bigger than 5, a difference of - 10 and a played bigger than 12? ### Response:
SELECT MAX("Points") FROM table_43184 WHERE "Lost" > '5' AND "Difference" = '- 10' AND "Played" > '12'
### Instruction: Show the first name and last name for the customer with account name 900. ### Response:
SELECT T2.customer_first_name, T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "900"
### Instruction: What shows at 1:00 pm when 4:00 pm shows local programs, and 8:00 am is The Early Show? ### Response:
SELECT "1:00 pm" FROM table_61198 WHERE "4:00 pm" = 'local programs' AND "8:00 am" = 'the early show'
### Instruction: During the quarter of 2012 Q2, how many millions of Blackberry OS phones where shipped when 0.1 million others were shipped? ### Response:
SELECT COUNT(blackberry_os) FROM table_14260687_3 WHERE other = "0.1" AND quarter = "2012 Q2"
### Instruction: what is minimum age of patients whose insurance is medicaid and ethnicity is american indian/alaska native? ### Response:
SELECT MIN(demographic.age) FROM demographic WHERE demographic.insurance = "Medicaid" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE"
### Instruction: Tell me the total number of administrative panel with labour panel more than 2, nominated by taoiseach more than 6 and total of 28 ### Response:
SELECT COUNT(administrative_panel) FROM table_name_59 WHERE labour_panel > 2 AND total = 28 AND nominated_by_the_taoiseach > 6
### Instruction: Which championship has Roger Federer as an opponent on a clay surface in a year earlier than 2007? ### Response:
SELECT "Championship" FROM table_38066 WHERE "Opponent" = 'roger federer' AND "Surface" = 'clay' AND "Year" < '2007'
### Instruction: What's the least amount of laps that George Eaton completed that has a time/retired engine and a grid larger than 8? ### Response:
SELECT MIN("Laps") FROM table_10651 WHERE "Time/Retired" = 'engine' AND "Grid" > '8' AND "Driver" = 'george eaton'
### Instruction: Which races have points greater than 123, fernando alonso as the driver and a percentage of possible points of 74.44%? ### Response:
SELECT races FROM table_name_77 WHERE points > 123 AND driver = "fernando alonso" AND percentage_of_possible_points = "74.44%"
### Instruction: what is the highest number of games played when there was 2 losses, percentage was 0.00% and more than 0 draws? ### Response:
SELECT MAX("Played") FROM table_15294 WHERE "Lost" = '2' AND "Percentage" = '0.00%' AND "Drawn" > '0'
### Instruction: Can you tell me the lowest Cap Number that has the Date of 8 february 2009, and the Shirt Number larger than 19? ### Response:
SELECT MIN("Cap Number") FROM table_76750 WHERE "Date" = '8 february 2009' AND "Shirt Number" > '19'
### Instruction: who finished directly after the driver who finished in 1:28.745 ? ### Response:
SELECT "driver" FROM table_204_496 WHERE "pos" = (SELECT "pos" FROM table_204_496 WHERE "time/retired" = '+1:28.745') + 1
### Instruction: what is the type when the averaging time is 1-hour and the standard is 0.12 ppm (235 g/m )? ### Response:
SELECT type FROM table_name_62 WHERE averaging_time = "1-hour" AND standard = "0.12 ppm (235 μg/m³)"
### Instruction: what is the total number of patients treated with mupirocin cream 2%? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Mupirocin Cream 2%"
### Instruction: Show the proportion of the districts of markets they are on, a pie chart. ### Response:
SELECT District, COUNT(District) FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID GROUP BY District
### Instruction: WHAT WAS THE SCORE OF THE GAME WITH A 2007-03-06, 20:45 KICKOFF? ### Response:
SELECT "Result" FROM table_77102 WHERE "Kick Off" = '2007-03-06, 20:45'
### Instruction: what is the average dynamo when draw is more than 0, played is less than 15 and spartak is more than 1? ### Response:
SELECT AVG("Dynamo") FROM table_65753 WHERE "Draw" > '0' AND "Played" < '15' AND "Spartak" > '1'
### Instruction: Solving the (RE)SOLVED title issue!. ### Response:
SELECT p.Id AS "post_link", p.CreationDate, p.LastActivityDate, p.AcceptedAnswerId, p.ClosedDate FROM Posts AS p WHERE UPPER(p.Title) LIKE '%SOLVED%' ORDER BY p.CreationDate DESC
### Instruction: How many Dentists in ' Los Angeles ' have a rating above 4 ? ### Response:
SELECT COUNT(DISTINCT (business.name)) FROM business, category WHERE business.city = 'Los Angeles' AND business.rating > 4 AND category.business_id = business.business_id AND category.category_name = 'Dentists'
### Instruction: how many paitents aged below 24 years had a id drug route. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "24" AND prescriptions.route = "ID"
### Instruction: How many figures are given for total number of South Asians in 2001 for the area where they were 4.4% of population in 2011? ### Response:
SELECT COUNT("South Asians 2001") FROM table_21406 WHERE "% 2011" = '4.4%'
### Instruction: give me the number of patients whose age is less than 27 and lab test abnormal status is delta? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "27" AND lab.flag = "delta"
### Instruction: What is the CERCLIS ID of the site in Polk County, with the date 08/04/2009? ### Response:
SELECT "CERCLIS ID" FROM table_11972 WHERE "County" = 'polk' AND "Deleted" = '08/04/2009'
### Instruction: give me the number of patients whose primary disease is hyperglycemia and year of birth is less than 2129? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA" AND demographic.dob_year < "2129"
### Instruction: Show the names of players and names of their coaches. ### Response:
SELECT T3.Player_name, T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID
### Instruction: Count the number of patients with ST elevation myocardial infarction primary disease who died in or before 2111. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "STEMI" AND demographic.dod_year <= "2111.0"
### Instruction: Get Parent-Child links between duplicate questions. ### Response:
SELECT PostLinks.PostId AS "child", PostLinks.RelatedPostId AS "parent" FROM PostLinks JOIN PostHistory ON PostLinks.PostId = PostHistory.PostId WHERE PostLinks.LinkTypeId = 3 AND PostHistory.PostHistoryTypeId = 10
### Instruction: How many total Rank listings have Liu Xiaosheng listed as the athlete with a react entry that is smaller than 0.245? ### Response:
SELECT COUNT("Rank") FROM table_79304 WHERE "Athlete" = 'liu xiaosheng' AND "React" < '0.245'
### Instruction: in a year before, how many prescriptions were written for moexipril? ### Response:
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.drug = 'moexipril' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')
### Instruction: how many patients are with single marital status and tested for lipase in lab? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab.label = "Lipase"
### Instruction: What was the score on a clay surface in a year later than 2006 with David Ferrer as an opponent? ### Response:
SELECT "Score" FROM table_38064 WHERE "Surface" = 'clay' AND "Year" > '2006' AND "Opponent" = 'david ferrer'
### Instruction: Tell me the average pesticide residue for each state in the US where food is grown. ### Response:
SELECT T1.growst, AVG(T2.concen) FROM sampledata15 AS T1 JOIN resultsdata15 AS T2 ON T1.sample_pk = T2.sample_pk GROUP BY T1.growst
### Instruction: What are the first names and support rep ids for employees serving 10 or more customers, and could you list total number in descending order please? ### Response:
SELECT T1.FirstName, T1.SupportRepId FROM Customer AS T1 JOIN Employee AS T2 ON T1.SupportRepId = T2.EmployeeId ORDER BY T1.SupportRepId DESC
### Instruction: How many proteins are associated with an institution founded after 1880 or an institution with type 'Private'? ### Response:
SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private'
### Instruction: What is the lowest jersey # that has evergreen park, illinois as the birthplace, with a weight (km) greater than 86? ### Response:
SELECT MIN("Jersey #") FROM table_7368 WHERE "Birthplace" = 'evergreen park, illinois' AND "Weight (kg)" > '86'
### Instruction: What are the ids, scores, and dates of the games which caused at least two injury accidents? ### Response:
SELECT T1.id, T1.score, T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2
### Instruction: How many gymnasts are from each hometown Plot them as bar chart, rank in asc by the total number please. ### Response:
SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*)
### Instruction: which papers use WordNet or Dbpedia ? ### Response:
SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset WHERE dataset.datasetname IN ('WordNet', 'Dbpedia') AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid GROUP BY paper.paperid
### Instruction: how many more goals did he have in 2009 than 2005 ? ### Response:
SELECT (SELECT "goals" FROM table_203_34 WHERE "season" = 2009) - (SELECT "goals" FROM table_203_34 WHERE "season" = 2005)
### Instruction: Who won the women's singles before 1958 when dave f. mctaggart won the men's singles? ### Response:
SELECT "Women's singles" FROM table_69957 WHERE "Men's singles" = 'dave f. mctaggart' AND "Year" < '1958'
### Instruction: What was the rainfall by volume in Huetar Atlantico where the rainfall depth (mm/year) was 3527? ### Response:
SELECT "Rainfall by volume (km 3 /year)" FROM table_28221 WHERE "Rainfall by depth (mm/year)" = '3527'
### Instruction: What was the date of the Cubs game that had an attendance over 20,737 and a loss of Dawley (2-3)? ### Response:
SELECT "Date" FROM table_11296 WHERE "Attendance" > '20,737' AND "Loss" = 'dawley (2-3)'
### Instruction: What streak start has a total less than 79, 22t as the rank, and tampa bay as the teams? ### Response:
SELECT "Streak start" FROM table_5879 WHERE "Total" < '79' AND "Rank" = '22t' AND "Teams" = 'tampa bay'
### Instruction: Display a bar chart for what are the names of the technicians and how many machines are they assigned to repair?, rank names in desc order. ### Response:
SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name ORDER BY Name DESC
### Instruction: provide the number of patients whose admission type is urgent and admission location is trsf within this facility? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admission_location = "TRSF WITHIN THIS FACILITY"
### Instruction: Which Number of electorates (2009) has a District of sheopur, and a Constituency number of 1? ### Response:
SELECT COUNT("Number of electorates (2009)") FROM table_14125 WHERE "District" = 'sheopur' AND "Constituency number" = '1'
### Instruction: tell me the number of patients who had pt lab test and are less than 59 years of age. ### 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.label = "PT"
### Instruction: How many tickets were sold / available for the venue that had a gross revenue of $333,100 in 2011? ### Response:
SELECT "Tickets Sold / Available" FROM table_69199 WHERE "Gross Revenue (2011)" = '$333,100'
### Instruction: let me know the type of admission and lab test category of patient with patient id 2560. ### Response:
SELECT demographic.admission_type, lab."CATEGORY" FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560"
### Instruction: What is the College/Junior/Club Team (League) when the position is rw, and the player is Don Murdoch? ### Response:
SELECT "College/Junior/Club Team (League)" FROM table_9199 WHERE "Position" = 'rw' AND "Player" = 'don murdoch'
### Instruction: where can we find some restaurants on bethel island rd in bethel island ? ### Response:
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'bethel island' AND location.street_name = 'bethel island rd' AND restaurant.id = location.restaurant_id
### Instruction: What is the smallest value for League Cup when the League number is greater than 1, no FA Cups, and Brian Deane scoring? ### Response:
SELECT MIN("League Cup") FROM table_52168 WHERE "League" > '1' AND "Name" = 'brian deane' AND "FA Cup" < '1'
### Instruction: What's the total grid for a Time/Retired of +1:03.741, and Laps larger than 44? ### Response:
SELECT COUNT("Grid") FROM table_51532 WHERE "Time/Retired" = '+1:03.741' AND "Laps" > '44'
### Instruction: What is the FCC info for the translator with frequency over 89.3MHz and licensd in Portales, New Mexico? ### Response:
SELECT "FCC info" FROM table_65522 WHERE "Frequency MHz" > '89.3' AND "City of license" = 'portales, new mexico'
### Instruction: Return a bar chart about the distribution of date_address_from and the average of monthly_rental , and group by attribute other_details and bin date_address_from by time. ### Response:
SELECT date_address_from, AVG(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
### Instruction: Name the high assists for madison square garden 19,763 and record is 39 38 ### Response:
SELECT high_assists FROM table_27713583_11 WHERE location_attendance = "Madison Square Garden 19,763" AND record = "39–38"
### Instruction: What is the result for partial thromboplastin time when prothrombin time and bleeding time are prolonged? ### Response:
SELECT "Partial thromboplastin time" FROM table_24819 WHERE "Prothrombin time" = 'Prolonged' AND "Bleeding time" = 'Prolonged'