instruction
stringlengths 53
549
| output
stringlengths 30
2.33k
|
---|---|
### Instruction:
how many female patients used the drug code metl25?
### 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.formulary_drug_cd = "METL25" |
### Instruction:
What was the final score of the game against shingo kunieda maikel scheffers when robin ammerlaan was Ronald Vink's partner?
### Response:
| SELECT score_in_final FROM table_name_86 WHERE partnering = "robin ammerlaan" AND opponents_in_final = "shingo kunieda maikel scheffers" |
### Instruction:
Who is from italy has 0 giro wins, 0 young rider and less than 3 maglia rosa?
### Response:
| SELECT "Name" FROM table_64870 WHERE "Country" = 'italy' AND "Giro Wins" = '0' AND "Young rider" = '0' AND "Maglia Rosa" < '3' |
### Instruction:
What is the name of the Count Palatine of the Rhine with a Interregnum began of 2 april 1657 death of ferdinand iii?
### Response:
| SELECT "Count Palatine of the Rhine" FROM table_53879 WHERE "Interregnum began" = '2 april 1657 death of ferdinand iii' |
### Instruction:
what is the properties of sodium when lithium is h a l o g e n s and rubidium is nacl (2.1)?
### Response:
| SELECT "Sodium" FROM table_70787 WHERE "Lithium" = 'h a l o g e n s' AND "Rubidium" = 'nacl (2.1)' |
### Instruction:
What is the number of the votes of the election before 2004 with edward mahama as the candidate with 3.0% share of votes?
### Response:
| SELECT number_of_votes FROM table_name_74 WHERE candidate = "edward mahama" AND election < 2004 AND share_of_votes = "3.0%" |
### Instruction:
How many votes have a Seat of house A, and a Percentage of 75.44%, and a District smaller than 11?
### Response:
| SELECT COUNT("Vote") FROM table_60023 WHERE "Seat" = 'house a' AND "Percentage" = '75.44%' AND "District" < '11' |
### Instruction:
What is the lowest number of matches played that has more than 0 draws, a percentage of 12.50%, and fewer than 3 losses?
### Response:
| SELECT MIN("Played") FROM table_69760 WHERE "Drawn" > '0' AND "Percentage" = '12.50%' AND "Lost" < '3' |
### Instruction:
Find YouTube Videos in answers. Lists all answers which are containing a link against YouTube-Videos.
### Response:
| SELECT Score AS "Score", Id AS "post_link" FROM Posts WHERE PostTypeId = 2 AND (Body LIKE '%http://www.youtube.com/watch%' OR Body LIKE '%http://www.youtube.com/v/%') ORDER BY Score DESC |
### Instruction:
Which Top 10 has a Top 5 larger than 1, and a Year of 2003, and Poles larger than 0?
### Response:
| SELECT AVG("Top 10") FROM table_38440 WHERE "Top 5" > '1' AND "Year" = '2003' AND "Poles" > '0' |
### Instruction:
After the year 2008.0, who played for Maryland the same year M.O.T. LL Middletown played in Delaware?
### Response:
| SELECT "Maryland" FROM table_17911 WHERE "Delaware" = 'M.O.T. LL Middletown' AND "Year" > '2008.0' |
### Instruction:
Count the number of patients admitted before the year 2177 whose 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.admityear < "2177" AND lab.flag = "delta" |
### Instruction:
What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?
### Response:
| SELECT COUNT(*), T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year |
### Instruction:
What is the average total of the census after 1971 with 10,412 (32.88%) Serbs?
### Response:
| SELECT AVG("total") FROM table_35491 WHERE "Year of census" > '1971' AND "Serbs" = '10,412 (32.88%)' |
### Instruction:
What is at 9:00 when at 10:00 it is local programming and at 9:30 it is my thursday night movie?
### Response:
| SELECT "9:00" FROM table_78117 WHERE "10:00" = 'local programming' AND "9:30" = 'my thursday night movie' |
### Instruction:
what is minimum age of patients whose primary disease is bladder cancer/sda and admission year is greater than or equal to 2107?
### Response:
| SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "BLADDER CANCER/SDA" AND demographic.admityear >= "2107" |
### Instruction:
Which ERP W is the highest one that has a Frequency MHz larger than 88.3, and a City of license of lewis, kansas?
### Response:
| SELECT MAX("ERP W") FROM table_38060 WHERE "Frequency MHz" > '88.3' AND "City of license" = 'lewis, kansas' |
### Instruction:
Which Years at club have a Debut year of 1930, and Games larger than 7, and a Player of colin benham?
### Response:
| SELECT "Years at club" FROM table_14166 WHERE "Debut year" = '1930' AND "Games" > '7' AND "Player" = 'colin benham' |
### Instruction:
Top C Devs in Greece.
### Response:
| SELECT u.Id AS id, COUNT(a.Id) AS answerCount FROM Posts AS a JOIN Users AS u ON u.Id = a.OwnerUserId JOIN Posts AS q ON a.ParentId = q.Id WHERE q.Tags LIKE '%C++%' AND u.Location LIKE '%Greece%' GROUP BY u.Id |
### Instruction:
What is the sum of Wins, when Against is less than 1033, when Golden Rivers is 'Nullawil', and when Byes is less than 2?
### Response:
| SELECT SUM(wins) FROM table_name_85 WHERE against < 1033 AND golden_rivers = "nullawil" AND byes < 2 |
### Instruction:
What is the 1981 value of the Macedonian population with a 1971 number greater than 192 and a 1991 of 1748?
### Response:
| SELECT 1981 FROM table_name_54 WHERE number_1971 > 192 AND 1991 = 1748 |
### Instruction:
A bar chart for what are the number of the dates that have an average sea level pressure between 303 and 31?, and sort in asc by the how many date please.
### Response:
| SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(date) |
### Instruction:
What is the average place for a song with votes smaller than 8696, the song 'turn the tide', and a draw larger than 3?
### Response:
| SELECT AVG("Place") FROM table_71024 WHERE "Votes" < '8696' AND "Song" = 'turn the tide' AND "Draw" > '3' |
### Instruction:
which awards ceremony had the same number of viewers as the 18th ?
### Response:
| SELECT "no." FROM table_204_996 WHERE "no." <> 18 AND "viewers\n(millions)" = (SELECT "viewers\n(millions)" FROM table_204_996 WHERE "no." = 18) |
### Instruction:
What is the lowest Opponents, when Raiders Poinsts is greater than 38, and when Attendance is greater than 51,267?
### Response:
| SELECT MIN("Opponents") FROM table_58787 WHERE "Raiders points" > '38' AND "Attendance" > '51,267' |
### Instruction:
What is the average Against when the drawn is more than 2 and the Difference of- 17, and a Played smaller than 20?
### Response:
| SELECT AVG("Against") FROM table_6891 WHERE "Drawn" > '2' AND "Difference" = '- 17' AND "Played" < '20' |
### Instruction:
What is the lowest to par of a player from australia with a score of 76-70-75-72=293?
### Response:
| SELECT MIN(to_par) FROM table_name_96 WHERE country = "australia" AND score = 76 - 70 - 75 - 72 = 293 |
### Instruction:
What is Place, when To Par is less than 15, and when Score is 76-72-75-71=294?
### Response:
| SELECT "Place" FROM table_8693 WHERE "To par" < '15' AND "Score" = '76-72-75-71=294' |
### Instruction:
what is the difference in rank between nancy pelosi and john boehner ?
### Response:
| SELECT ABS((SELECT "rank" FROM table_203_409 WHERE "representative" = 'nancy pelosi') - (SELECT "rank" FROM table_203_409 WHERE "representative" = 'john boehner')) |
### Instruction:
Show all allergy type with number of students affected Visualize by bar chart, show in desc by the bars.
### Response:
| SELECT AllergyType, COUNT(*) FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy GROUP BY T2.AllergyType ORDER BY AllergyType DESC |
### Instruction:
What was the Opponent on the game played on a Hard Surface with a Score of 3 6, 6 3, [7 10]?
### Response:
| SELECT opponent_in_the_final FROM table_name_61 WHERE surface = "hard" AND score = "3–6, 6–3, [7–10]" |
### Instruction:
When a variant without niqqud is as middle letter: with a phonemic value of /v/, what is the variant with niqqud?
### Response:
| SELECT variant__with_niqqud__ FROM table_name_53 WHERE phonemic_value = "/v/" AND without_niqqud = "as middle letter: וו" |
### Instruction:
How many laps with a grid larger than 7 did a Lotus - Ford do with a Time/Retired of + 2 laps?
### Response:
| SELECT SUM("Laps") FROM table_58534 WHERE "Grid" > '7' AND "Constructor" = 'lotus - ford' AND "Time/Retired" = '+ 2 laps' |
### Instruction:
For those records from the products and each product's manufacturer, a bar chart shows the distribution of headquarter and the average of price , and group by attribute headquarter.
### Response:
| SELECT Headquarter, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter |
### Instruction:
What is the average cost of procedures that physician John Wen was trained in?
### Response:
| SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" |
### Instruction:
What is the least value for total population in 2001 with a growth rate in 1991-01 of 33.08?
### Response:
| SELECT MIN("Total Population 2001") FROM table_23094 WHERE "Growth Rate 1991-01" = '33.08' |
### Instruction:
Which Constructor has a Grid smaller than 24, more than 77 laps, and a Driver of jean-pierre beltoise?
### Response:
| SELECT "Constructor" FROM table_11679 WHERE "Grid" < '24' AND "Laps" > '77' AND "Driver" = 'jean-pierre beltoise' |
### Instruction:
What was the reward when immunity went to martin and finish is 13th voted out 8th jury member day 46?
### Response:
| SELECT "Reward" FROM table_27265 WHERE "Immunity" = 'Martin' AND "Finish" = '13th Voted Out 8th Jury Member Day 46' |
### Instruction:
What is the value for the byte string when the memory map, decimal, and floating points are all standard and the max memory is smaller than 512?
### Response:
| SELECT byte_string FROM table_name_23 WHERE memory_map = "standard" AND decimal = "standard" AND floating_point = "standard" AND max_memory__kwords_ < 512 |
### Instruction:
What's the total failures among rockets that had more than 3 successes, type ariane 5 and more than 0 partial failures?
### Response:
| SELECT COUNT("Failures") FROM table_79770 WHERE "Successes" > '3' AND "Type" = 'ariane 5' AND "Partial failures" > '0' |
### Instruction:
Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%.
### Response:
| SELECT incumbent FROM table_2668401_12 WHERE candidates = "Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%" |
### Instruction:
What are the names, checking balances, and savings balances for all customers?
### Response:
| SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid |
### Instruction:
For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday.
### Response:
| SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) |
### Instruction:
Which Runner-up has a Last win smaller than 1998, and Wins of 1, and a Rank larger than 13?
### Response:
| SELECT COUNT("Runner-up") FROM table_37594 WHERE "Last win" < '1998' AND "Wins" = '1' AND "Rank" > '13' |
### Instruction:
which contest was held in the same site as the game versus western carolina ?
### Response:
| SELECT "opponent" FROM table_204_436 WHERE "opponent" <> 'western carolina' AND "site" = (SELECT "site" FROM table_204_436 WHERE "opponent" = 'western carolina') |
### Instruction:
What camera has the highest Mpix with an aspect ratio of 2:1, a height less than 1536, and a width smaller than 2048?
### Response:
| SELECT MAX(mpix) FROM table_name_51 WHERE aspect_ratio = "2:1" AND height < 1536 AND width < 2048 |
### Instruction:
What season has esc holzkirchen south, esv buchloe west, and ehc bayreuth north?
### Response:
| SELECT "Season" FROM table_50326 WHERE "South" = 'esc holzkirchen' AND "West" = 'esv buchloe' AND "North" = 'ehc bayreuth' |
### Instruction:
How many patients admitted to the hospital before 2139 had a lab test base excess?
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2139" AND lab.label = "Base Excess" |
### Instruction:
What is the average Barrow Island Australia when Draugen north sea is 17 and Mutineer-Exeter Australia is smaller than 6?
### Response:
| SELECT AVG(barrow_island_australia) FROM table_name_94 WHERE draugen_north_sea = 17 AND mutineer_exeter_australia < 6 |
### Instruction:
which kingdom contained the second most villages , next only to godara ?
### Response:
| SELECT "name of kingdom" FROM table_203_713 WHERE "no. of villages" < (SELECT "no. of villages" FROM table_203_713 WHERE "name of kingdom" = 'godara') ORDER BY "no. of villages" DESC LIMIT 1 |
### Instruction:
count the number of patients whose admission location is trsf within this facility and year of birth is less than 2087?
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.dob_year < "2087" |
### Instruction:
did the wycombe wanderers have more or less points than the plymouth argyle ?
### Response:
| SELECT (SELECT "score" FROM table_203_620 WHERE "home team" = 'wycombe wanderers') > (SELECT "score" FROM table_203_620 WHERE "home team" = 'plymouth argyle') |
### Instruction:
What is the smallest sales area (m ) that has 4,094/m and more than 2 stores?
### Response:
| SELECT MIN("Sales area (m\u00b2)") FROM table_4413 WHERE "Sales per area" = '€4,094/m²' AND "No. of stores" > '2' |
### Instruction:
What is the best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made?
### Response:
| SELECT MAX("Top-10") FROM table_62299 WHERE "Events" < '39' AND "Top-5" = '1' AND "Cuts made" > '5' |
### Instruction:
For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the name , and group by attribute name by a bar chart.
### Response:
| SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name |
### Instruction:
how many patients whose age is less than 68 and item id is 51221?
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "68" AND lab.itemid = "51221" |
### Instruction:
Draw a bar chart about the distribution of meter_200 and the average of meter_100 , and group by attribute meter_200, display Y in descending order please.
### Response:
| SELECT meter_200, AVG(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY AVG(meter_100) DESC |
### Instruction:
people who answered the same question.
### Response:
| SELECT p1.OwnerUserId, p2.OwnerUserId FROM Posts AS p1 JOIN Posts AS p2 ON p1.ParentId = p2.ParentId WHERE p1.OwnerUserId < p2.OwnerUserId AND p1.PostTypeId = 2 AND p2.PostTypeId = 2 |
### Instruction:
pre existing kidney failure requiring dialysis or serum creatinine value > 320 mmol / l ( 3.6 mg / dl )
### Response:
| SELECT * FROM table_train_22 WHERE (kidney_disease = 1 AND requiring_dialysis = 1) OR serum_creatinine > 320 |
### Instruction:
Find the number of the 'date became customers' of the customers whose ID is between 10 and 20, rank y axis in ascending order.
### Response:
| SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 ORDER BY COUNT(date_became_customer) |
### Instruction:
Find the names of stadiums that the most swimmers have been to.
### Response:
| SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1 |
### Instruction:
which portion has the same intersecting route as rabin boulevard ?
### Response:
| SELECT "name" FROM table_203_108 WHERE "name" <> 'rabin boulevard' AND "intersecting routes" = (SELECT "intersecting routes" FROM table_203_108 WHERE "name" = 'rabin boulevard') |
### Instruction:
How many students are advised by each rank of faculty? List the rank and the number of students Plot them as bar chart, I want to display from low to high by the Rank please.
### Response:
| SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank ORDER BY Rank |
### Instruction:
What is the total prominence in ft of the peak of kangchenjunga central, which has a prominence in m less than 32?
### Response:
| SELECT COUNT(prominence__ft_) FROM table_name_67 WHERE name_of_peak = "kangchenjunga central" AND prominence__m_ < 32 |
### Instruction:
find the number of single patients whose drug route is iv bolus.
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "SINGLE" AND prescriptions.route = "IV BOLUS" |
### Instruction:
count the number of patients whose insurance is private and procedure long title is transplant from cadaver?
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Transplant from cadaver" |
### Instruction:
What is the presentation of credentials date of ra l h. castro, who has a title of ambassador extraordinary and plenipotentiary?
### Response:
| SELECT "Presentation of Credentials" FROM table_71879 WHERE "Title" = 'ambassador extraordinary and plenipotentiary' AND "Representative" = 'raúl h. castro' |
### Instruction:
until 2104, was patient 2700 in an emergency room?
### Response:
| SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 2700 AND admissions.admission_location = 'emergency room admit' AND STRFTIME('%y', admissions.admittime) <= '2104' |
### Instruction:
how many patients have gotten discharged from the hospital this year?
### Response:
| SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND DATETIME(patient.hospitaldischargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') |
### Instruction:
patients 18 years and older with at least 2 of 4 sirs criteria plus: lactate >= 2 mg / dl, and sofa score >= 4
### Response:
| SELECT * FROM table_train_68 WHERE age >= 18 AND lactate > 2 AND sequential_organ_failure_assessment_sofa >= 4 |
### Instruction:
What is the highest number of poles of the year before 1992 with more than 18 starts and winnings of $125,102?
### Response:
| SELECT MAX(poles) FROM table_name_81 WHERE starts > 18 AND winnings = "$125,102" AND year < 1992 |
### Instruction:
how did patient 22756 last enter the hospital in 2104?
### Response:
| SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 22756 AND STRFTIME('%y', admissions.admittime) = '2104' ORDER BY admissions.admittime DESC LIMIT 1 |
### Instruction:
how many patients below 86 years of age followed the procedure endosc remove bile stone?
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "86" AND procedures.short_title = "Endosc remove bile stone" |
### Instruction:
Can you tell me the sum of Score that has the Place of t5, and the Country of united states, and the Player of jeff maggert?
### Response:
| SELECT SUM("Score") FROM table_43991 WHERE "Place" = 't5' AND "Country" = 'united states' AND "Player" = 'jeff maggert' |
### Instruction:
Top stackoverflow users in Lebanon. Top stackoverflow users in Lebanon
### Response:
| SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC), CONCAT('https://stackoverflow.com/users/', Id) AS profile, Reputation, DisplayName, WebsiteUrl, Location, CreationDate FROM Users WHERE UPPER(Location) LIKE '%LEBANON%' ORDER BY Reputation DESC |
### Instruction:
What are the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh', and count them by a bar chart
### Response:
| SELECT date_of_latest_logon, COUNT(date_of_latest_logon) FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" |
### Instruction:
What were the total number of points when there was a lost larger than 6, when the team was Once Municipal, and when the number of goals scored was less than 8?
### Response:
| SELECT COUNT("Points") FROM table_15700 WHERE "Lost" > '6' AND "Team" = 'once municipal' AND "Goals Scored" < '8' |
### Instruction:
what is the number of patients whose gender is m and lab test name is magnesium, urine?
### 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 = "Magnesium, Urine" |
### Instruction:
What is the earliest year that the building in sonnemannstra e/r ckertstra e, ostend was built with a height larger than 185 meters?
### Response:
| SELECT MIN(year_built) FROM table_name_26 WHERE location = "sonnemannstraße/rückertstraße, ostend" AND height__m_ > 185 |
### Instruction:
Close votes on Tag X.
### Response:
| SELECT Posts.Id AS "post_link" FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE Tags.TagName = '##Tag:string##' AND Posts.CreationDate > DATEADD(year, -1, GETDATE()) |
### Instruction:
What are the number of the last names for all scholarship students?, and show in ascending by the x-axis.
### Response:
| SELECT LName, COUNT(LName) FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.OnScholarship = 'Y' GROUP BY LName ORDER BY LName |
### Instruction:
Who was runner-up at Berlin when the result was 2-0 with 100,000 fans in attendance?
### Response:
| SELECT "Runner-Up" FROM table_45388 WHERE "Venue" = 'berlin' AND "Result" = '2-0' AND "Attendance" = '100,000' |
### Instruction:
Which Nationality has a Rank larger than 1, and a Time smaller than 22.12, and a Lane smaller than 4, and a Name of ashley callus?
### Response:
| SELECT nationality FROM table_name_99 WHERE rank > 1 AND time < 22.12 AND lane < 4 AND name = "ashley callus" |
### Instruction:
What is the average FA Cup Goal value for players that have 0 Other goals, 0 FL Cup goals, and fewer than 39 League goals?
### Response:
| SELECT AVG(fa_cup_goals) FROM table_name_33 WHERE other_goals = 0 AND fl_cup_goals = 0 AND league_goals < 39 |
### Instruction:
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and price , and group by attribute name.
### Response:
| SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name |
### Instruction:
Return a histogram on what are the names of different tracks, and how many races has each had?, and could you display by the y-axis in descending?
### Response:
| SELECT T2.Name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.Track_ID = T2.Track_ID GROUP BY T1.Track_ID ORDER BY COUNT(*) DESC |
### Instruction:
Find dates and attendance for exhibitions that happened in 2004, show me the comparison of attendance by date.
### Response:
| SELECT T1.Date, T1.Attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.Exhibition_ID = T2.Exhibition_ID WHERE T2.Year = 2004 |
### Instruction:
previous to october 5 , 2008 how many matches were won ?
### Response:
| SELECT COUNT(*) FROM table_203_656 WHERE id < (SELECT id FROM table_203_656 WHERE "date" = 'october 5, 2008 - 15:00') AND "result" = 'won' |
### Instruction:
What are the names of all the songs whose album is under the label of 'Universal Music Group'?
### Response:
| SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = "Universal Music Group" |
### Instruction:
List the number of the description of the outcomes for all projects, and show by the X-axis in ascending.
### Response:
| SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY outcome_description |
### Instruction:
What sum of Losses has Year greater than 1972, and Competition of nswrfl, and Draws 0, and Wins 16?
### Response:
| SELECT SUM(loses) FROM table_name_18 WHERE year > 1972 AND competition = "nswrfl" AND draws = 0 AND wins = 16 |
### Instruction:
For every award, who is the youngest winner?
### Response:
| SELECT T1.player_id, T1.award_id, MIN(T1.year - T2.birth_year) FROM player_award AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id GROUP BY T1.award_id |
### Instruction:
Attendance larger than 63,439, and an Opponent of bayer leverkusen had what result?
### Response:
| SELECT "Result F\u2013A" FROM table_70799 WHERE "Attendance" > '63,439' AND "Opponents" = 'bayer leverkusen' |
### Instruction:
Return the name of each physician and the number of patients he or she treats in a bar chart, and I want to sort in ascending by the bars.
### Response:
| SELECT T1.Name, COUNT(*) FROM Physician AS T1 JOIN Patient AS T2 ON T1.EmployeeID = T2.PCP GROUP BY T1.EmployeeID ORDER BY T1.Name |
### Instruction:
provide the number of patients whose insurance is medicare and lab test name is hemoglobin?
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Medicare" AND lab.label = "Hemoglobin" |
### Instruction:
What is the Scoring rank when there are less than 21 events played with a rank of n/a in years less than 2011?
### Response:
| SELECT "Scoring rank" FROM table_7482 WHERE "Events played" < '21' AND "Rank" = 'n/a' AND "Year" < '2011' |
### Instruction:
please list the RENTAL CAR information in PITTSBURGH
### Response:
| SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PITTSBURGH' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR' |
### Instruction:
Count the number of spanish speaking patients who had an alkaline phosphatase lab test.
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.language = "SPAN" AND lab.label = "Alkaline Phosphatase" |
### Instruction:
provide the number of patients tested for other body fluid in the laboratory with age less than 47 years.
### 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 = "Other Body Fluid" |
### Instruction:
What is Ship, when Nationality is 'Syria', and when Date is '26 June 1943', and when Tonnage is '80'?
### Response:
| SELECT ship FROM table_name_39 WHERE nationality = "syria" AND date = "26 june 1943" AND tonnage = 80 |
Subsets and Splits