table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_train_25 ( "id" int, "bleeding" int, "acute_cerebrovascular_accident_cva" bool, "heart_disease" bool, "trauma" bool, "st_segment_elevation_myocardial_infarction_stemi" bool, "NOUSE" float )
obvious severe non traumatic bleeding
SELECT * FROM table_train_25 WHERE bleeding = 1
CREATE TABLE table_name_26 ( attendance VARCHAR, opponent VARCHAR )
When Hamilton Academical is the Opponent, what is the total Attendance?
SELECT COUNT(attendance) FROM table_name_26 WHERE opponent = "hamilton academical"
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subject_id number, ...
tell me what is the top three most common procedures?
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd GROUP BY procedures_icd.icd9_code) AS t1 WHERE t1.c1 <= 3)
CREATE TABLE table_1685 ( "Episode" text, "First broadcast" text, "Graemes guest" text, "Jeremys guest" text, "Votes (%)" text )
what is the name of the jeremy guest for the episode 1x01
SELECT "Jeremys guest" FROM table_1685 WHERE "Episode" = '1x01'
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodici...
what is the name of the diagnosis patient 028-70851 last was received until 4 years ago?
SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-70851')) AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CU...
CREATE TABLE table_203_564 ( id number, "hand" text, "1 credit" number, "2 credits" number, "3 credits" number, "4 credits" number, "5 credits" number )
each four aces win is a multiple of what number ?
SELECT "1 credit" FROM table_203_564 WHERE "hand" = 'four aces'
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Has_amenity ( dormid...
Find the average age of male students (with sex M) from each city, and rank Y from low to high order.
SELECT city_code, AVG(Age) FROM Student WHERE Sex = 'M' GROUP BY city_code ORDER BY AVG(Age)
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
My answers to questions with no accepted answer.
SELECT a.Score, a.Id AS "post_link", q.AnswerCount AS Answers, q.OwnerUserId AS "user_link", a.CreationDate AS "answered_on", a.PostTypeId FROM Posts AS a INNER JOIN Posts AS q ON q.Id = a.ParentId WHERE q.AcceptedAnswerId IS NULL AND a.OwnerUserId = '##MyID##' ORDER BY a.CreationDate DESC
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
How many rooms cost more than 120, for each different decor Plot them as bar chart, and list by the Y from low to high.
SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor ORDER BY COUNT(*)
CREATE TABLE table_40980 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
What is the result of the game on October 17, 1965?
SELECT "Result" FROM table_40980 WHERE "Date" = 'october 17, 1965'
CREATE TABLE table_name_1 ( value VARCHAR, first_issued VARCHAR, reverse VARCHAR )
How much was a Reverse of guitar of agust n p o barrios before 1998?
SELECT value FROM table_name_1 WHERE first_issued < 1998 AND reverse = "guitar of agustín pío barrios"
CREATE TABLE table_76584 ( "2006/ 07" text, "2008/ 09" text, "2010/ 11" text, "2011/ 12" text, "2012/ 13" text )
What is 2006/07, when 2008/09 is LQ, and when 2010/11 is Not Held?
SELECT "2006/ 07" FROM table_76584 WHERE "2008/ 09" = 'lq' AND "2010/ 11" = 'not held'
CREATE TABLE table_20861261_4 ( position VARCHAR, player VARCHAR )
What's Curtis Painter's position?
SELECT position FROM table_20861261_4 WHERE player = "Curtis Painter"
CREATE TABLE table_29933 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Name the number of date for stephen curry , dorell wright (27)
SELECT COUNT("Date") FROM table_29933 WHERE "High points" = 'Stephen Curry , Dorell Wright (27)'
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime t...
tell me the top four most common diagnoses of patients with an age of 60 or above during the last year?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age >= 60) ...
CREATE TABLE table_name_8 ( position VARCHAR, pick VARCHAR, team VARCHAR )
what is the position when the pick is higher than 32 and the team is atlanta braves?
SELECT position FROM table_name_8 WHERE pick > 32 AND team = "atlanta braves"
CREATE TABLE table_name_16 ( muzzle_energy VARCHAR, source VARCHAR )
What is Muzzle energy, when Source is hornady?
SELECT muzzle_energy FROM table_name_16 WHERE source = "hornady"
CREATE TABLE table_1376890_2 ( chroma_format VARCHAR, scalable_modes VARCHAR, intra_dc_precision VARCHAR )
what's the chroma format with scalable modes being snr- or spatial-scalable and intra dc precbeingion being 8, 9, 10
SELECT chroma_format FROM table_1376890_2 WHERE scalable_modes = "SNR- or spatial-scalable" AND intra_dc_precision = "8, 9, 10"
CREATE TABLE table_59460 ( "Club" text, "Coach" text, "City" text, "Stadium" text, "2007-2008 season" text )
Who coached for al farwaniyah?
SELECT "Coach" FROM table_59460 WHERE "City" = 'al farwaniyah'
CREATE TABLE table_28946 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
How many times were the candidates leven powell (f) 63.8% roger west (dr) 36.4%?
SELECT COUNT("First elected") FROM table_28946 WHERE "Candidates" = 'Leven Powell (F) 63.8% Roger West (DR) 36.4%'
CREATE TABLE participates_in ( stuid number, actid number ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABL...
Find the name of the activity that has the largest number of student participants.
SELECT T1.activity_name FROM activity AS T1 JOIN participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE table_203_67 ( id number, "place" number, "team" text, "played" number, "won" number, "draw" number, "lost" number, "goals\nscored" number, "goals\nconceded" number, "+/-" number, "points" number )
how many games were played ?
SELECT SUM("played") FROM table_203_67
CREATE TABLE table_66254 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
How many silver medals did Estonia, which won more than 1 gold and less than 97 medals total, win?
SELECT "Silver" FROM table_66254 WHERE "Gold" > '1' AND "Total" < '97' AND "Nation" = 'estonia'
CREATE TABLE table_41298 ( "Outcome" text, "Date" text, "Surface" text, "Opponent" text, "Score" text )
What is the score where the opponent was Mardy Fish?
SELECT "Score" FROM table_41298 WHERE "Opponent" = 'mardy fish'
CREATE TABLE table_20804 ( "Institution" text, "Location" text, "Nickname" text, "Enrollment" real, "Established" real )
Location of the school with the nickname Mountaineers
SELECT "Location" FROM table_20804 WHERE "Nickname" = 'Mountaineers'
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, ...
Find tag wikis with an image inside them..
SELECT * FROM Posts WHERE Posts.PostTypeId = 5 AND 'Tag Name' LIKE '%sql%'
CREATE TABLE table_80391 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
What was the loss of the Brewers game when the record was 46-48?
SELECT "Loss" FROM table_80391 WHERE "Record" = '46-48'
CREATE TABLE table_name_83 ( country VARCHAR, date VARCHAR, birth_date VARCHAR )
What country was the woman from who was born 1976-07-23 and became a grandmaster in 1991?
SELECT country FROM table_name_83 WHERE date = 1991 AND birth_date = "1976-07-23"
CREATE TABLE table_39505 ( "Game" real, "February" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
Which Game is the average one that has a February larger than 20, and a Record of 41 17 4, and Points smaller than 86?
SELECT AVG("Game") FROM table_39505 WHERE "February" > '20' AND "Record" = '41–17–4' AND "Points" < '86'
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE T...
how many FIRST class flights does UA have leaving from all cities today
SELECT COUNT(DISTINCT flight.flight_id) FROM airport_service, city, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((DATE_DAY_0.day_number = 29 AND DATE_DAY_0.month_number = 4 AND DATE_DAY_0.year = 1...
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
2 ml : furosemide 10 mg/ml ij soln what is the price?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = '2 ml : furosemide 10 mg/ml ij soln')
CREATE TABLE table_65415 ( "Region" text, "Date" text, "Format" text, "Label" text, "Edition" text )
What format was released April 16, 2009?
SELECT "Format" FROM table_65415 WHERE "Date" = 'april 16, 2009'
CREATE TABLE table_50541 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What is High Rebounds, when Date is 'March 13'?
SELECT "High rebounds" FROM table_50541 WHERE "Date" = 'march 13'
CREATE TABLE table_78603 ( "Date" text, "Venue" text, "Winner" text, "Runner-up" text, "Score" text )
Who was the winner in the match that had John Higgins as runner-up?
SELECT "Winner" FROM table_78603 WHERE "Runner-up" = 'john higgins'
CREATE TABLE stadium ( id int, name text, Home_Games int, Average_Attendance real, Total_Attendance real, Capacity_Percentage real ) CREATE TABLE game ( stadium_id int, id int, Season int, Date text, Home_team text, Away_team text, Score text, Competition text ) ...
Stacked bar chart of how many away team for with each Home_team in each away team
SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Home_team, Away_team
CREATE TABLE table_51716 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text )
For the Player playing for the College of Kentucky and a Height of 6-7 what was their corresponding School?
SELECT "School" FROM table_51716 WHERE "College" = 'kentucky' AND "Height" = '6-7'
CREATE TABLE table_68891 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text )
What is the second leg that Valencia was on?
SELECT "2nd leg" FROM table_68891 WHERE "Team 2" = 'valencia'
CREATE TABLE table_name_21 ( opponent VARCHAR, week VARCHAR )
What is the Opponent of the game in Week 3?
SELECT opponent FROM table_name_21 WHERE week = 3
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
give me the number of patients whose admission type is emergency and procedure short title is vaccination nec?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Vaccination NEC"
CREATE TABLE table_name_24 ( game INTEGER, date VARCHAR )
What is the average Game with a Date that is june 14?
SELECT AVG(game) FROM table_name_24 WHERE date = "june 14"
CREATE TABLE table_30972 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text )
How many episodes are 122 in the series?
SELECT COUNT("No. in season") FROM table_30972 WHERE "No. in series" = '122'
CREATE TABLE table_53186 ( "Round" real, "Pick #" real, "Player" text, "Position" text, "College" text )
What is the Position of Pick #77?
SELECT "Position" FROM table_53186 WHERE "Pick #" = '77'
CREATE TABLE table_39703 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
How many total medals for germany with under 56 bronzes?
SELECT SUM("Total") FROM table_39703 WHERE "Nation" = 'germany' AND "Bronze" < '56'
CREATE TABLE table_1300525_1 ( density VARCHAR, english_name VARCHAR )
What is the density of yushan county?
SELECT COUNT(density) FROM table_1300525_1 WHERE english_name = "Yushan County"
CREATE TABLE table_66601 ( "Frequency" text, "Call sign" text, "Branding" text, "Format" text, "Owner" text )
What frequency is First Nations Community?
SELECT "Frequency" FROM table_66601 WHERE "Format" = 'first nations community'
CREATE TABLE table_28885977_1 ( location VARCHAR, built_for VARCHAR )
In what location was a stadium built for the St Kilda Football Club?
SELECT location FROM table_28885977_1 WHERE built_for = "St Kilda Football Club"
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
tell me the age and health insurance of patient with patient id 17595.
SELECT demographic.age, demographic.insurance FROM demographic WHERE demographic.subject_id = "17595"
CREATE TABLE table_63709 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
What is the nationality with a lane larger than 1, and a rank larger than 5, for Hsu Chi-Chieh?
SELECT "Nationality" FROM table_63709 WHERE "Lane" > '1' AND "Rank" > '5' AND "Name" = 'hsu chi-chieh'
CREATE TABLE table_60569 ( "Measure" text, "Bombali" real, "Bonthe" real, "Kailahun" real, "Kambia" text, "Kenema" real, "Koinadugu" real, "Kono" real, "Moyamba" text, "Port Loko" text, "Pujehun" real, "Tonkolili" real )
What is the average pjehun measured by female enrollment?
SELECT AVG("Pujehun") FROM table_60569 WHERE "Measure" = 'female enrollment'
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
provide the number of patients whose procedure short title is percutan liver aspirat?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Percutan liver aspirat"
CREATE TABLE table_name_13 ( founded INTEGER, suburb_town VARCHAR )
On average, when were vineyard schools founded?
SELECT AVG(founded) FROM table_name_13 WHERE suburb_town = "vineyard"
CREATE TABLE table_name_95 ( lead VARCHAR, institute VARCHAR, social_democratic VARCHAR )
Name the lead for institute of election results and social democratic of 31.7% 8 seats
SELECT lead FROM table_name_95 WHERE institute = "election results" AND social_democratic = "31.7% 8 seats"
CREATE TABLE table_57739 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text, "Arena" text, "Points" real )
How many points when under 17,197 attended against the wild?
SELECT AVG("Points") FROM table_57739 WHERE "Attendance" < '17,197' AND "Opponent" = 'wild'
CREATE TABLE table_name_67 ( opponent VARCHAR, against VARCHAR )
who is the opponent when norway is against?
SELECT opponent FROM table_name_67 WHERE against = "norway"
CREATE TABLE product_characteristics ( product_id number, characteristic_id number, product_characteristic_value text ) CREATE TABLE products ( product_id number, color_code text, product_category_code text, product_name text, typical_buying_price text, typical_selling_price text, ...
Which category does the product named 'flax' belong to?
SELECT product_category_code FROM products WHERE product_name = "flax"
CREATE TABLE table_48684 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
What is the Outcome of the game with a Score of 6 4, 6 4?
SELECT "Outcome" FROM table_48684 WHERE "Score" = '6–4, 6–4'
CREATE TABLE table_25711913_8 ( points INTEGER, position VARCHAR )
What is the most points recorded for a right halfback?
SELECT MAX(points) FROM table_25711913_8 WHERE position = "Right halfback"
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ...
TOP 1000 users from Bhubaneswar & Cuttack, India. Lists the top 1000 users (ranked by reputation) that are located in Bangalore, Karnataka, India according to their profile information. Thanks to http://data.stackexchange.com/stackoverflow/query/60933/top-50-users-from-india Edited by GNKeshava
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE LOWER(Location) LIKE '%Bhubaneswar%' OR UPPER(Location) LIKE '%Bhubaneswar%' OR Location LIKE '%Bhubaneswar%' OR LOWER(Location) LIKE '%Bhubaneshwar%' OR UPPER(Location) LIKE '%Bhubaneshwar%' O...
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters ...
Whose course were students minoring in STRATEGY in when they got B- 's ?
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id WHERE (student_rec...
CREATE TABLE table_40121 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
What is the highest number of Played games with a Position smaller than 2 and Drawn games less than 4?
SELECT MAX("Played") FROM table_40121 WHERE "Position" < '2' AND "Drawn" < '4'
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE microlab ( microl...
what is the average total cost of a hospital which involves the cortisol since 2104?
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'cortisol')) AND STRFTIME('%y', cost.chargetime) >= '2104' GROUP BY c...
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
give the primary disease and procedure icd9 code for subject id 18077.
SELECT demographic.diagnosis, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "18077"
CREATE TABLE table_8684 ( "Player" text, "Nationality" text, "Position" text, "Years for Grizzlies" text, "School/Club Team" text )
Which player played for the Grizzlies from 1997-1998?
SELECT "Player" FROM table_8684 WHERE "Years for Grizzlies" = '1997-1998'
CREATE TABLE table_12526990_1 ( mundubbera INTEGER, biggenden VARCHAR )
What is the minimum mundubbera when biggenden is 1882
SELECT MIN(mundubbera) FROM table_12526990_1 WHERE biggenden = 1882
CREATE TABLE table_name_88 ( ground VARCHAR, home_team VARCHAR )
What is the ground of the game where the home team was Adelaide?
SELECT ground FROM table_name_88 WHERE home_team = "adelaide"
CREATE TABLE table_12573 ( "Central Murray" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
What is the total number of wins of the central murray of koondrook-barham, which has more than 0 draws?
SELECT COUNT("Wins") FROM table_12573 WHERE "Central Murray" = 'koondrook-barham' AND "Draws" > '0'
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
what is diagnoses long title of subject id 3343?
SELECT diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "3343"
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepi...
until 1 year ago, what are the three most frequently prescribed drugs?
SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY medication.drugname) AS t1 WHERE t1.c1 <= 3
CREATE TABLE table_21568 ( "1391 Carelia" text, "1398 Donnera" text, "1405 Sibelius" text, "1406 Komppa" text, "1407 Lindel\u00f6f" text )
what is the 1406 komppa of asteroid which 1405 sibelius is 2737 kotka
SELECT "1406 Komppa" FROM table_21568 WHERE "1405 Sibelius" = '2737 Kotka'
CREATE TABLE table_39836 ( "Rank" text, "s Wicket" text, "Player" text, "Matches" text, "Average" text )
What rank has andy bichel (qld) as the player?
SELECT "Rank" FROM table_39836 WHERE "Player" = 'andy bichel (qld)'
CREATE TABLE table_name_23 ( result VARCHAR, nominee VARCHAR )
What was the result of Declan Donnellan's nomination?
SELECT result FROM table_name_23 WHERE nominee = "declan donnellan"
CREATE TABLE table_name_2 ( award_ceremony VARCHAR, role VARCHAR, year VARCHAR )
Which Award Ceremony in 2009 has a Role of Glinda?
SELECT award_ceremony FROM table_name_2 WHERE role = "glinda" AND year = 2009
CREATE TABLE table_35136 ( "Hand" text, "1 credit" text, "2 credits" text, "3 credits" text, "4 credits" text, "5 credits" text )
What's the listed Hand has 3 credits of 6?
SELECT "Hand" FROM table_35136 WHERE "3 credits" = '6'
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
Visualize a bar chart about the distribution of Name and Weight , and I want to sort in descending by the Y.
SELECT Name, Weight FROM people ORDER BY Weight DESC
CREATE TABLE table_68691 ( "Episode #" real, "Title" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Part 5" text, "Part 6" text )
When is Part 6, when Part 4 is on March 2, 2008?
SELECT "Part 6" FROM table_68691 WHERE "Part 4" = 'march 2, 2008'
CREATE TABLE table_60932 ( "Outcome" text, "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text )
How many days had a score of 4 6, 4 6?
SELECT COUNT("Date") FROM table_60932 WHERE "Score in the final" = '4–6, 4–6'
CREATE TABLE table_17942 ( "Year" real, "Starts" real, "Wins (Majors)" text, "2nd" real, "3rd" real, "Earnings ($)" real, "Money list rank" text, "Scoring average" text )
What is the money list rank for 1966?
SELECT "Money list rank" FROM table_17942 WHERE "Year" = '1966'
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name var...
what aircraft has the largest seating capacity
SELECT DISTINCT aircraft_code FROM aircraft WHERE capacity = (SELECT MAX(AIRCRAFTalias1.capacity) FROM aircraft AS AIRCRAFTalias1)
CREATE TABLE song ( song_name text, artist_name text, country text, f_id number, genre_is text, rating number, languages text, releasedate time, resolution number ) CREATE TABLE files ( f_id number, artist_name text, file_size text, duration text, formats text ) ...
What are the names of the artists who released a song that has the word love in its title, and where are the artists from?
SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE "%love%"
CREATE TABLE table_name_9 ( cup_goals INTEGER, league_apps INTEGER )
How many cup goals for the season with more than 34 league apps?
SELECT AVG(cup_goals) FROM table_name_9 WHERE league_apps > 34
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
for icd9 code 29690, specify the diagnosis short title.
SELECT diagnoses.short_title FROM diagnoses WHERE diagnoses.icd9_code = "29690"
CREATE TABLE table_27700375_10 ( high_points VARCHAR, date VARCHAR )
who had high points on march 14?
SELECT high_points FROM table_27700375_10 WHERE date = "March 14"
CREATE TABLE table_204_358 ( id number, "species" text, "common name" text, "ncbi accession #" text, "ncbi name" text, "length" text, "sequence identity" text, "sequence similarity" text, "years since divergence from human (mya)" number )
name the species that has the longest years since divergence from human .
SELECT "species" FROM table_204_358 ORDER BY "years since divergence from human (mya)" DESC LIMIT 1
CREATE TABLE table_60874 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text )
Can you tell me the average Against thaylt has the Date of 23/03/2002?
SELECT AVG("Against") FROM table_60874 WHERE "Date" = '23/03/2002'
CREATE TABLE table_name_78 ( game INTEGER, team VARCHAR )
What is the average Game, when Team is 'Milwaukee'?
SELECT AVG(game) FROM table_name_78 WHERE team = "milwaukee"
CREATE TABLE table_2665085_1 ( park VARCHAR, name VARCHAR )
How many parks is Zippin Pippin located in
SELECT COUNT(park) FROM table_2665085_1 WHERE name = "Zippin Pippin"
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ...
Keywords for Qt posts Jan-March 2015.
SELECT TIME_TO_STR(p.CreationDate, '%YEAR') AS Year, TIME_TO_STR(p.CreationDate, '%-mONT%-H') AS Month, COUNT(*) AS Questions, SUM(p.AnswerCount) AS Answers, SUM(p.Score) AS QuestionUpvotes, SUM(p.ViewCount) AS "views", SUM(CASE WHEN p.Score > 1 THEN 1 ELSE 0 END) AS "upvotedquestions", SUM(CASE WHEN NOT p.AcceptedAnsw...
CREATE TABLE table_name_92 ( attendance VARCHAR, record VARCHAR )
What was the attendance at the game with a record of 4-5?
SELECT attendance FROM table_name_92 WHERE record = "4-5"
CREATE TABLE table_39723 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
What is Roy Hall's highest round?
SELECT MAX("Round") FROM table_39723 WHERE "Name" = 'roy hall'
CREATE TABLE table_80168 ( "School" text, "Location" text, "Mascot" text, "County" text, "Joined" text, "Previous Conference" text, "Left" text, "Conference joined" text )
Which conference held at School of whiting?
SELECT "Previous Conference" FROM table_80168 WHERE "School" = 'whiting'
CREATE TABLE table_204_392 ( id number, "#" number, "stadium" text, "capacity" number, "city" text, "country" text, "domed or retractable roof" text )
how many stadiums have a capacity of more than 70,000 ?
SELECT COUNT("stadium") FROM table_204_392 WHERE "capacity" > 70000
CREATE TABLE table_79383 ( "Year" real, "Game" text, "Genre" text, "Platform(s)" text, "Developer(s)" text )
What game was in 2001?
SELECT "Game" FROM table_79383 WHERE "Year" = '2001'
CREATE TABLE table_name_29 ( position VARCHAR, player VARCHAR )
What position is played by farmar, jordan jordan farmar?
SELECT position FROM table_name_29 WHERE player = "farmar, jordan jordan farmar"
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsysto...
what are the four most commonly used procedures for patients who had received antiemetic - anticholinergic previously during the same month, until 1 year ago?
SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antiemetic - anticholinergic' AND DATETI...
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
What is the average price of the rooms for each different decor? Show me a bar chart!, and sort y-axis in ascending order.
SELECT decor, AVG(basePrice) FROM Rooms GROUP BY decor ORDER BY AVG(basePrice)
CREATE TABLE table_1876825_5 ( title VARCHAR, original_air_date VARCHAR )
What is title of episode aired on March 2, 2003?
SELECT title FROM table_1876825_5 WHERE original_air_date = "March 2, 2003"
CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Student_Tests_Taken ( registration_id IN...
Find the number of courses for each subject in a bar chart, and order by the x axis in ascending.
SELECT subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY subject_name
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems...
until 08/24/2105, what was the first value of arterial bp [diastolic] for patient 23938?
SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23938)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ...
CREATE TABLE affiliated_with ( physician number, department number, primaryaffiliation boolean ) CREATE TABLE block ( blockfloor number, blockcode number ) CREATE TABLE nurse ( employeeid number, name text, position text, registered boolean, ssn number ) CREATE TABLE patient (...
Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.
SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.employeeid = T2.physician JOIN department AS T3 ON T2.department = T3.departmentid WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'
CREATE TABLE table_10244 ( "Software" text, "Calculations" text, "Macros" text, "Loci" text, "Animations" text, "Multilingual" text, "Proofs" text )
Is there Loci in the Cinderella software?
SELECT "Loci" FROM table_10244 WHERE "Software" = 'cinderella'