instruction
stringlengths
53
549
output
stringlengths
30
2.33k
### Instruction: give me the number of patients whose age is less than 85 and drug name is paroxetine hcl? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "85" AND prescriptions.drug = "Paroxetine HCl"
### Instruction: Which school district receive the most of federal revenue through state in Wisconsin? ### Response:
SELECT T1.school_district FROM finrev_fed_17 AS T1 JOIN finrev_fed_key_17 AS T2 ON T1.state_code = T2.state_code WHERE T2.state = "Wisconsin" ORDER BY T1.t_fed_rev DESC LIMIT 1
### Instruction: What is 2006/07, when 2011/12 is LQ, and when 2010/11 is LQ? ### Response:
SELECT "2006/ 07" FROM table_76588 WHERE "2011/ 12" = 'lq' AND "2010/ 11" = 'lq'
### Instruction: How many people in Stanthorpe had a population matching Rosenthan of 1,553 and a population greater than 25,917? ### Response:
SELECT COUNT("Population (Stanthorpe)") FROM table_67960 WHERE "Population (Rosenthal)" = '1,553' AND "Population (Region total)" > '25,917'
### Instruction: What 2008 has 1r as a 2010, A as the 2007, and 1r as the 2009? ### Response:
SELECT "2008" FROM table_61615 WHERE "2010" = '1r' AND "2007" = 'a' AND "2009" = '1r'
### Instruction: How many of the patients born before the year 2167 had atria septa def rep nec? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2167" AND procedures.short_title = "Atria septa def rep NEC"
### Instruction: find the number of patients with procedure icd9 code 3593 who were born before 2047. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2047" AND procedures.icd9_code = "3593"
### Instruction: Show the number of addrens history for each customer in a bar chart. ### Response:
SELECT T2.customer_name, COUNT(T2.customer_name) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id GROUP BY T2.customer_name
### Instruction: What is the name for the red list of 7, the artiodactyla order, and Species Authority of cervus elaphus linnaeus, 1758? ### Response:
SELECT name FROM table_name_4 WHERE red_list = 7 AND order = "artiodactyla" AND species_authority = "cervus elaphus linnaeus, 1758"
### Instruction: how many patients of white ethnicity are diagnosed with hx of bladder malignancy? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.short_title = "Hx of bladder malignancy"
### Instruction: what is maximum age of patients whose language is engl and primary disease is hypertension;rule out coronary artery disease\cardiac cath? ### Response:
SELECT MAX(demographic.age) FROM demographic WHERE demographic.language = "ENGL" AND demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH"
### Instruction: what number of newborn patients are diagnosed under icd9 code 77081? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "NEWBORN" AND diagnoses.icd9_code = "77081"
### Instruction: Name the total number of tourism receipts 2011 where tourism receipts 2003 13.5 ### Response:
SELECT COUNT("Tourism receipts (2011) (US$ per capita)") FROM table_22413 WHERE "Tourism receipts (2003) (as % of GDP)" = '13.5'
### Instruction: what is the highest qualifying rank where the competition is olympic trials, the final-rank is 4 and qualifying score is 15.100? ### Response:
SELECT MAX(qualifying_rank) FROM table_13114949_3 WHERE competition = "Olympic Trials" AND final_rank = "4" AND qualifying_score = "15.100"
### Instruction: let me know the number of patients born before 2053 who have been prescribed main type drugs. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2053" AND prescriptions.drug_type = "MAIN"
### Instruction: how many black/african american patients had the item id 51363? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND lab.itemid = "51363"
### Instruction: systolic blood pressure < 120 mmhg, heart rate < 60 bpm, or av block ( pr > 240 ms or superior ) on diagnosis. ### Response:
SELECT * FROM table_test_9 WHERE systolic_blood_pressure_sbp < 120 OR heart_rate < 60 OR av_block = 1 OR pr > 240
### Instruction: what is the number of patients whose admission year is less than 2150 and lab test category is chemistry? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2150" AND lab."CATEGORY" = "Chemistry"
### Instruction: What is the number of patients who had a lmw heparin lab test and were hospitalized for more than 30 days? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "30" AND lab.label = "Heparin, LMW"
### Instruction: What is the full amount of Total Cargo (in Metric Tonnes) where the Code (IATA/ICAO) is pvg/zspd, and the rank is less than 3? ### Response:
SELECT SUM(total_cargo__metric_tonnes_) FROM table_name_13 WHERE code__iata_icao_ = "pvg/zspd" AND rank < 3
### Instruction: For those records from the products and each product's manufacturer, find founder and the sum of price , and group by attribute founder, and visualize them by a bar chart, and list by the X in ascending please. ### Response:
SELECT Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder
### Instruction: How many distinct characteristic names does the product 'cumin' have? ### Response:
SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame"
### Instruction: Which Runs is the highest one that has a Match larger than 63, and a Venue of national stadium, karachi, and a Year smaller than 1996? ### Response:
SELECT MAX("Runs") FROM table_6279 WHERE "Match" > '63' AND "Venue" = 'national stadium, karachi' AND "Year" < '1996'
### Instruction: has patient 10425 had a lab test done since 6 years ago? ### Response:
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10425) AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-6 year')
### Instruction: For each phone, show its names and total number of stocks Visualize by bar chart, and rank num of stock in descending order. ### Response:
SELECT Name, SUM(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name ORDER BY SUM(T1.Num_of_stock) DESC
### Instruction: Question view vs question age. ### Response:
SELECT DATEDIFF(d, CreationDate, GETDATE()) AS "Question Age", ViewCount AS "Question Views" FROM Posts WHERE PostTypeId = 1 AND ViewCount > '##ViewCountLowerCutoff?1000##' AND ViewCount < '##ViewCountUpperCutoff?1000000##' ORDER BY CreationDate
### Instruction: What year had a black of Kramnik, opening of E05 Catalan Opening, moves greater than 38, and a result of ? ### Response:
SELECT MAX("Year") FROM table_8508 WHERE "Result" = '½–½' AND "Black" = 'kramnik' AND "Opening" = 'e05 catalan opening' AND "Moves" > '38'
### Instruction: SELECT TOP 200 * FROM Posts WHERE PostTypeID = '1' AND Month(CreationDate) = '02' AND Year(Creation. ### Response:
SELECT * FROM Posts WHERE PostTypeId = '1' AND MONTH(CreationDate) = '02' AND YEAR(CreationDate) = '2019' ORDER BY ViewCount DESC LIMIT 200
### Instruction: Who were the opponents in the final when the game was played on hard surface and the score of the final was 6 1, 1 6, 7 6(4)? ### Response:
SELECT "Opponents in Final" FROM table_7729 WHERE "Surface" = 'hard' AND "Score in Final" = '6–1, 1–6, 7–6(4)'
### Instruction: count the number of patients whose admission year is less than 2125 and lab test category is blood gas? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2125" AND lab."CATEGORY" = "Blood Gas"
### Instruction: how many years did the democratic party have the majority before 1876 in the south carolina house of representatives ? ### Response:
SELECT COUNT("year") FROM table_203_95 WHERE "democratic\nparty" > "republican\nparty" AND "democratic\nparty" > "independent\n/ other" AND "year" < 1876
### Instruction: What is the lowest number of olives of the governorate with less than 247,265 industrial crops and more than 37,638 cereals? ### Response:
SELECT MIN("Olives") FROM table_12849 WHERE "Industrial crops" < '247,265' AND "Cereals" > '37,638'
### Instruction: Search for answers of a specific user to questions in my favorites. ### Response:
SELECT a.Id AS "post_link", a.Body FROM Posts AS a INNER JOIN Votes AS v ON v.PostId = a.ParentId WHERE v.UserId = '##UserId:int##' AND v.VoteTypeId = 5 AND a.OwnerUserId = '##AnotherUserId:int##'
### Instruction: how many hours has it been since patient 015-23047 has been admitted to the icu? ### Response:
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '015-23047' AND patient.unitdischargetime IS NULL
### Instruction: Get Tag Info for tags used over 50 times. ### Response:
SELECT t.Id, t.TagName, ts.SourceTagName, t.Count, t.WikiPostId, P.Body FROM Tags AS t JOIN TagSynonyms AS ts ON t.TagName = ts.TargetTagName JOIN Posts AS p ON p.Id = t.WikiPostId WHERE t.Count > 50 ORDER BY t.TagName
### Instruction: What is the club that has played 22 rounds, has a drawn score of 0, has lost 14, and whose losing BP is 5? ### Response:
SELECT "Club" FROM table_67892 WHERE "Played" = '22' AND "Drawn" = '0' AND "Lost" = '14' AND "Losing BP" = '5'
### Instruction: provide the number of jehovah's witness religious background patients who had triglycerides lab test. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "JEHOVAH'S WITNESS" AND lab.label = "Triglycerides"
### Instruction: Show the shortest duration and lowest rating of songs grouped by genre using a bar chart, could you rank in asc by the bar please? ### Response:
SELECT MIN(T1.duration), MIN(T2.rating) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY MIN(T1.duration) ORDER BY MIN(T1.duration)
### Instruction: What was the status of Bluetooth for the model that launched after 2004 with a ROM (MiB) of 128 and a Wifi of 802.11b? ### Response:
SELECT bluetooth FROM table_name_5 WHERE launch_year > 2004 AND rom___mib__ = 128 AND wifi = "802.11b"
### Instruction: what is the number of patients whose days of hospital stay is greater than 13 and lab test name is epithelial cells? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "13" AND lab.label = "Epithelial Cells"
### Instruction: Reputation List: Choose a location. List of users by reputation score by location. ### Response:
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Location, Reputation, LastAccessDate, Age FROM Users WHERE LENGTH(Location) > 1 AND LOWER(Location) LIKE LOWER('%##Location##%') ORDER BY Reputation DESC
### Instruction: In the year 1992 for the Seibu Lions, the BB + HBP which is larger than 49 was this as a BA (Place)? ### Response:
SELECT "BA (Place)" FROM table_69873 WHERE "BB +HBP" > '49' AND "Team" = 'seibu lions' AND "Year" = '1992'
### Instruction: Popular MongoDB Queries by ViewCount. ### Response:
SELECT Score, ViewCount, CreationDate, DATEDIFF(DAY, CreationDate, GETDATE()) AS "DaysOpen", (ViewCount / DATEDIFF(DAY, CreationDate, GETDATE())) AS "NewScore", LastActivityDate, Title, Id, Tags FROM Posts WHERE Title LIKE '%mongodb%' OR Tags LIKE '%mongodb%' ORDER BY NewScore DESC
### Instruction: provide the number of patients whose drug name is maalox/diphenhydramine/lidocaine? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Maalox/Diphenhydramine/Lidocaine"
### Instruction: What Scores by each individual judge has a Status of current, and a Co-contestant (Yaar vs. Pyaar) of krushna abhishek? ### Response:
SELECT scores_by_each_individual_judge FROM table_name_67 WHERE status = "current" AND co_contestant__yaar_vs_pyaar_ = "krushna abhishek"
### Instruction: patients with uncontrolled diabetes will be excluded because high glucose will alter the fdg _ pet studies. the clinic that does pet ( columbia university medical center ) excludes patients if glucose values exceed 200 mg / ml. ### Response:
SELECT * FROM table_train_81 WHERE uncontrolled_diabetes = 0 OR high_glucose = 0
### Instruction: provide the number of patients whose admission type is urgent and procedure icd9 code is 9744? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.icd9_code = "9744"
### Instruction: Find the names of scientists who are not working on the project with the highest hours. ### Response:
SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.ssn WHERE T2.hours = (SELECT MAX(hours) FROM projects)
### Instruction: what is the average total when bronze is more than 0, gold is 0, the nation is united states (usa) and silver is 0? ### Response:
SELECT AVG("Total") FROM table_50718 WHERE "Bronze" > '0' AND "Gold" = '0' AND "Nation" = 'united states (usa)' AND "Silver" < '0'
### Instruction: give the number of patients whose insurance is medicaid and diagnosis short title is drug induced neutropenia. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicaid" AND diagnoses.short_title = "Drug induced neutropenia"
### Instruction: What are the last names and ages of the students who are allergic to milk and cat? Plot them as bar chart, and order in asc by the Y. ### Response:
SELECT LName, Age FROM Student WHERE StuID IN (SELECT StuID FROM Has_Allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_Allergy WHERE Allergy = "Cat") ORDER BY Age
### Instruction: provide the number of patients whose admission type is elective and procedure icd9 code is 4611? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.icd9_code = "4611"
### Instruction: provide the number of patients whose drug name is 0.9% sodium chloride (mini bag plus). ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "0.9% Sodium Chloride (Mini Bag Plus)"
### Instruction: What's China's highest 1985-1990 assuming a 2000-2005 larger than 3.08? ### Response:
SELECT MAX("1985-1990") FROM table_34953 WHERE "Region/country" = 'china' AND "2000-2005" > '3.08'
### Instruction: provide the number of patients whose ethnicity is black/haitian and lab test name is id, body fluid. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND lab.label = "LD, Body Fluid"
### Instruction: what is the points when the entrant is brabham racing organisation, the year is 1964 and the chassis is brabham bt7? ### Response:
SELECT "Points" FROM table_49672 WHERE "Entrant" = 'brabham racing organisation' AND "Year" = '1964' AND "Chassis" = 'brabham bt7'
### Instruction: How many services has each resident requested? List the resident id, details, and the count in descending order of the count. ### Response:
SELECT T1.resident_id, T1.other_details, COUNT(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY COUNT(*) DESC
### Instruction: what does the fare code F and FN mean ### Response:
SELECT DISTINCT fare_airline, fare_basis_code, fare_id, from_airport, one_direction_cost, restriction_code, round_trip_cost, round_trip_required, to_airport FROM fare WHERE fare_basis_code = 'F' OR fare_basis_code = 'FN'
### Instruction: find the number of patients who stayed in hospital for more than 14 days and were ordered direct bilirubin lab test. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "14" AND lab.label = "Bilirubin, Direct"
### Instruction: how many days has passed since patient 032-24135 was admitted to the intensive care unit? ### Response:
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '032-24135' AND patient.unitdischargetime IS NULL
### Instruction: Which locomotive had a 2-8-2t type, entered service year prior to 1915, and which was built after 1911? ### Response:
SELECT "Locomotive" FROM table_77568 WHERE "Type" = '2-8-2t' AND "Entered service" < '1915' AND "Built" > '1911'
### Instruction: tell me the number of patients with lab test item id 51347 who were admitted for more than 4 days in hospital. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "4" AND lab.itemid = "51347"
### Instruction: what was the total number of patients on careunit micu in 2104? ### Response:
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'micu' AND STRFTIME('%y', transfers.intime) = '2104')
### Instruction: Tell me the total number of snatches for clean and jerk more than 132.5 when the total kg was 315 and bodyweight was 68.63 ### Response:
SELECT COUNT(snatch) FROM table_name_62 WHERE clean_ & _jerk > 132.5 AND total__kg_ = 315 AND bodyweight = 68.63
### Instruction: provide the number of patients whose admission type is elective and drug name is cosyntropin? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Cosyntropin"
### Instruction: what's the party with candidates jerry weller (r) 51.77% clem balanoff (d) 48.23% ### Response:
SELECT "Party" FROM table_18188 WHERE "Candidates" = 'Jerry Weller (R) 51.77% Clem Balanoff (D) 48.23%'
### Instruction: What was the date of the game when the home team scored 21.18 (144) and the away team scored 16.19 (115)? ### Response:
SELECT "Date" FROM table_10162 WHERE "Home team score" = '21.18 (144)' AND "Away team score" = '16.19 (115)'
### Instruction: Out of total number of patients who had a lab test for pleural fluid, how many of them were born before 2089? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2089" AND lab.fluid = "Pleural"
### Instruction: For those employees who was hired before 2002-06-21, for manager_id, hire_date, visualize the trend, and display X-axis in descending order. ### Response:
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE DESC
### Instruction: give me the number of patients whose death status is 0 and lab test name is human chorionic gonadotropin? ### 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 = "Human Chorionic Gonadotropin"
### Instruction: After 1971, what is the Rank with a Height ft (m) of 19.0 477 (145) and less than 35 Floors? ### Response:
SELECT rank FROM table_name_90 WHERE year > 1971 AND floors < 35 AND height_ft__m_ = "19.0 477 (145)"
### Instruction: What are the types of vocals that the musician with the last name 'Heilo' played in 'Der Kapitan'? ### Response:
SELECT type FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = "Heilo" AND T2.title = "Der Kapitan"
### Instruction: give me the number of patients who had percutaneous aspiration of gallbladder and are still alive. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Percutaneous aspiration of gallbladder"
### Instruction: Recent questions with specific word in the title (case insensitive). ### Response:
SELECT Id AS "post_link", Title, OwnerUserId AS "user_link", Score, Tags, CreationDate FROM Posts WHERE (PostTypeId = 1) AND (Title LIKE '%##word?urgent##%' COLLATE Latin1_General_CI_AI) ORDER BY Id DESC LIMIT 100
### Instruction: For each product, show its name and the number of times it was ordered. Show the proportion. ### Response:
SELECT T3.product_name, SUM(COUNT(*)) FROM Orders AS T1 JOIN Order_Items AS T2 JOIN Products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_name
### Instruction: Who was the winner if the Mountains Classification award was given to Jaime Vergara and the Team Classification award is given to Col es Pasion Caf De Colombia 472? ### Response:
SELECT winner FROM table_28853064_15 WHERE mountains_classification = "Jaime Vergara" AND team_classification = "Col es Pasion Café De Colombia 472"
### Instruction: Which FSB/HT frequency (MHz) has a SATA larger than 6 and DDR 266/333/400 Registered/ECC memory? ### Response:
SELECT fsb_ht_frequency__mhz_ FROM table_name_79 WHERE sata > 6 AND memory = "ddr 266/333/400 registered/ecc"
### Instruction: What is the average square kilometer area of the division that has a 2,448 square mile area and a national share larger than 0.065%? ### Response:
SELECT AVG("Area (km\u00b2)") FROM table_48169 WHERE "Area (sq mi)" = '2,448' AND "National Share (%)" > '0.065'
### Instruction: List the state names and the number of customers living in each state with a bar chart, display bar from high to low order please. ### Response:
SELECT state_province_county, COUNT(*) FROM Customer_Addresses AS t1 JOIN Addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county ORDER BY state_province_county DESC
### Instruction: What was the delivery date when s2 (lst) type, s2 (frigate) type, c1-m type was delivered? ### Response:
SELECT 1 AS st_ship_delivery_date FROM table_11552751_2 WHERE ship_types_delivered = "S2 (LST) type, S2 (frigate) type, C1-M type"
### Instruction: How many patients of white russian ethnicity were given the drug through both eyes? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND prescriptions.route = "BOTH EYES"
### Instruction: What is the total number of playoff games played by the Seattle Thunderbirds team where the number of regular games played is less than 5 and pick number is less than 131? ### Response:
SELECT COUNT(pl_gp) FROM table_name_16 WHERE reg_gp < 5 AND team__league_ = "seattle thunderbirds" AND pick__number < 131
### Instruction: how many days have elapsed since patient 015-59552 was admitted to hospital for? ### Response:
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '015-59552' AND patient.hospitaldischargetime IS NULL
### Instruction: What is the lowest feet total with a Longitude (E) of 76 34 06 , and a Prominence (m) under 1,701? ### Response:
SELECT MIN(feet) FROM table_name_22 WHERE longitude__e_ = "76°34′06″" AND prominence__m_ < 1 OFFSET 701
### Instruction: Among patients admitted before the year 2157, how many of them had item id 50820? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2157" AND lab.itemid = "50820"
### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of email and salary . ### Response:
SELECT EMAIL, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
### Instruction: Name the total number of 2010 for when 2009 is less than 14, 2008 is less than 15 and 2005 is 3 ### Response:
SELECT COUNT(2010) FROM table_name_85 WHERE 2009 < 14 AND 2008 < 15 AND 2005 = 3
### Instruction: What are the ids of the problems that are from the product 'voluptatem' and are reported after 1995? ### Response:
SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = "voluptatem" AND T1.date_problem_reported > "1995"
### Instruction: What is the sum of Rob Coldray's goals when he made fewer than 348 appearances with goals/game ratio less than 0.313? ### Response:
SELECT SUM("Goals") FROM table_41628 WHERE "Goals/Game Ratio" < '0.313' AND "Name" = 'rob coldray' AND "Appearances" < '348'
### Instruction: what is the number of patients who are diagnosed with posterior communicating aneurysm/sda and born before 1887? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA" AND demographic.dob_year < "1887"
### Instruction: provide the number of patients whose year of birth is less than 2121 and lab test name is hyaline casts? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2121" AND lab.label = "Hyaline Casts"
### Instruction: What is the lowest number of attempts for the player with a rank number larger than 3, who started after 1984 and had less than 6.1 yds/att? ### Response:
SELECT MIN("Attempts") FROM table_6388 WHERE "Rank" > '3' AND "Start" > '1984' AND "Yds/Att" < '6.1'
### Instruction: Top 1420 users from India. ### Response:
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%gurgaon%' OR UPPER(Location) LIKE '%Gurgaon%' OR Location LIKE '%Gurgaon%' ORDER BY Reputation DESC LIMIT 1420
### Instruction: Visualize the average smallest rating of different movie title using a bar chart, and I want to sort by the stars) in ascending please. ### Response:
SELECT T2.title, AVG(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title ORDER BY AVG(MIN(T1.stars))
### Instruction: How many silvers have a gold greater than 2, a bronze less than 35, china as the nation, with a total greater than 26? ### Response:
SELECT COUNT("Silver") FROM table_42700 WHERE "Gold" > '2' AND "Bronze" < '35' AND "Nation" = 'china' AND "Total" > '26'
### Instruction: get the number of urgent hospital admission patients who have prescription for calcium carbonate. ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.drug = "Calcium Carbonate"
### Instruction: how many days have passed since patient 013-38992 has been admitted to the hospital? ### Response:
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '013-38992' AND patient.hospitaldischargetime IS NULL
### Instruction: How much Attendance has Games smaller than 6, and a W-L-T of 3-2-0, and a Season smaller than 1948? ### Response:
SELECT SUM("Attendance") FROM table_14131 WHERE "Games" < '6' AND "W-L-T" = '3-2-0' AND "Season" < '1948'
### Instruction: Return the completion date for all the tests that have 'Fail' result, and count them by a bar chart ### Response:
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
### Instruction: how many patients are admitted before 2156 and diagnosed with end stage renal disease? ### Response:
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2156" AND diagnoses.short_title = "End stage renal disease"