instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
I want the sum of year for mark barron
CREATE TABLE table_name_11 (year INTEGER,player_name VARCHAR)
SELECT SUM(year) FROM table_name_11 WHERE player_name = "mark barron"
What year was the team Club of atl tico de san juan fc who plays at hiram bithorn stadium founded.
CREATE TABLE table_name_18 (founded INTEGER,stadium VARCHAR,club VARCHAR)
SELECT SUM(founded) FROM table_name_18 WHERE stadium = "hiram bithorn stadium" AND club = "atlético de san juan fc"
What was the away team that faced Carlton?
CREATE TABLE table_32245 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team" FROM table_32245 WHERE "Home team" = 'carlton'
What is the highest number of goals Eisb ren Berlin had along with 13 points and 10 assists?
CREATE TABLE table_48215 ("Player" text,"Club" text,"Games" real,"Goals" real,"Assists" real,"Points" real)
SELECT MAX("Goals") FROM table_48215 WHERE "Points" = '13' AND "Assists" = '10' AND "Club" = 'eisbären berlin'
Which Rank has a Show of alcatraz, and a Number of Viewers larger than 1,229,000?
CREATE TABLE table_64376 ("Rank" real,"Show" text,"Episode" text,"Number of Viewers" real,"Date" text)
SELECT MIN("Rank") FROM table_64376 WHERE "Show" = 'alcatraz' AND "Number of Viewers" > '1,229,000'
Which Format has a Date of 14 october 2008, and a Label of eagle eye media?
CREATE TABLE table_60538 ("Country" text,"Date" text,"Label" text,"Format" text,"Catalogue number(s)" text)
SELECT "Format" FROM table_60538 WHERE "Date" = '14 october 2008' AND "Label" = 'eagle eye media'
Which study included autoimmune disease and inflammation?
CREATE TABLE table_name_41 (name VARCHAR,indication VARCHAR)
SELECT name FROM table_name_41 WHERE indication = "autoimmune disease and inflammation"
What title was released in 1971?
CREATE TABLE table_name_54 (title VARCHAR,year VARCHAR)
SELECT title FROM table_name_54 WHERE year = 1971
what was the last gabapentin 100 mg po caps prescription time for patient 016-38131 in this month.
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,hospitaladmitsource text,unitadmittime time,unitdischargetime tim...
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-38131')) AND medication.drugname = 'gabapentin 100 mg po c...
Who is the club that has 30 points?
CREATE TABLE table_13564637_5 (club VARCHAR,points VARCHAR)
SELECT club FROM table_13564637_5 WHERE points = "30"
Average frequency with ERP W of 62?
CREATE TABLE table_47008 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" text,"FCC info" text)
SELECT AVG("Frequency MHz") FROM table_47008 WHERE "ERP W" = '62'
Total users added, by month, with reputation at least 50.
CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body ...
SELECT DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS "month", COUNT(*) AS "# Users Added", COUNT(IIF(u.Reputation >= 50, 1, NULL)) AS "# Users Added (current rep >= 50)" FROM Users AS u GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) ORDER BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
give the description of diagnoses icd9 code e8120.
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 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 ...
SELECT diagnoses.short_title FROM diagnoses WHERE diagnoses.icd9_code = "E8120"
how many times patient 006-50368 the last year visited the hospital.
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,obs...
SELECT COUNT(DISTINCT patient.patienthealthsystemstayid) FROM patient WHERE patient.uniquepid = '006-50368' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')
what were the specimen tests that patient 52456 first had in the last month?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE prescriptions (row_id number,subject_id num...
SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52456) AND DATETIME(microbiologyevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORDER BY microbiology...
when did patient 26156 come for the last time to the hospital?
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 d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventty...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 26156 ORDER BY admissions.admittime DESC LIMIT 1
how many competitions did jifar participate in before joining the 10000m ?
CREATE TABLE table_203_189 (id number,"year" number,"competition" text,"venue" text,"position" text,"notes" text)
SELECT COUNT("competition") FROM table_203_189 WHERE "notes" <> 10000
When did the term end for the U.S. Marine Corps?
CREATE TABLE table_50091 ("Name" text,"Branch" text,"Term began" text,"Term ended" text,"Time in office" text)
SELECT "Term ended" FROM table_50091 WHERE "Branch" = 'u.s. marine corps'
What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor. Visualize by pie chart.
CREATE TABLE entrepreneur (Entrepreneur_ID int,People_ID int,Company text,Money_Requested real,Investor text)CREATE TABLE people (People_ID int,Name text,Height real,Weight real,Date_of_Birth text)
SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor
Which Score has a Couple comprised of jason & edyta, and a Style of freestyle?
CREATE TABLE table_name_2 (score VARCHAR,couple VARCHAR,style VARCHAR)
SELECT score FROM table_name_2 WHERE couple = "jason & edyta" AND style = "freestyle"
Show the ids of all employees who have either destroyed a document or made an authorization to do this.
CREATE TABLE roles (role_code text,role_name text,role_description text)CREATE TABLE documents_to_be_destroyed (document_id number,destruction_authorised_by_employee_id number,destroyed_by_employee_id number,planned_destruction_date time,actual_destruction_date time,other_details text)CREATE TABLE document_locations (d...
SELECT destroyed_by_employee_id FROM documents_to_be_destroyed UNION SELECT destruction_authorised_by_employee_id FROM documents_to_be_destroyed
what are the five most commonly given laboratory tests for patients who previously had a partial pancreatect nec within the same month?
CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,ic...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_i...
What daft pick number is the player coming from Regina Pats (WHL)?
CREATE TABLE table_2850912_1 (pick__number VARCHAR,college_junior_club_team VARCHAR)
SELECT pick__number FROM table_2850912_1 WHERE college_junior_club_team = "Regina Pats (WHL)"
What is the Rank of the Character with Tenure of 2011?
CREATE TABLE table_name_2 (rank VARCHAR,tenure VARCHAR)
SELECT rank FROM table_name_2 WHERE tenure = "2011"
in how many dates the game was 2
CREATE TABLE table_31453 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT COUNT("Date") FROM table_31453 WHERE "Game" = '2'
What is the Year commissioned of the power station with a Gross head of 60 metres and Average annual output of less than 59 million KWh?
CREATE TABLE table_76085 ("Name" text,"Year commissioned" real,"Gross head (metres)" real,"Installed capacity (megawatts)" real,"Average annual output (million KWh)" real)
SELECT MAX("Year commissioned") FROM table_76085 WHERE "Gross head (metres)" = '60' AND "Average annual output (million KWh)" < '59'
Which opponent has a Season of 2010/11?
CREATE TABLE table_name_7 (opponent VARCHAR,season VARCHAR)
SELECT opponent FROM table_name_7 WHERE season = "2010/11"
What's the average number of wins for those with less than 2 byes?
CREATE TABLE table_61970 ("Golden Rivers" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real)
SELECT AVG("Wins") FROM table_61970 WHERE "Byes" < '2'
Calculate the minimum age of patients who had coronary artery disease or a coronary artery bypass graft had myomectomy/sda as their primary disease and died before the year 2138
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 procedures (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,marita...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT; MYOMECTOMY/SDA" AND demographic.dod_year < "2138.0"
What are the names and ages of editors? Show me a bar chart.
CREATE TABLE journal_committee (Editor_ID int,Journal_ID int,Work_Type text)CREATE TABLE journal (Journal_ID int,Date text,Theme text,Sales int)CREATE TABLE editor (Editor_ID int,Name text,Age real)
SELECT Name, Age FROM editor
Show me the proportion on what are the names and number of hours spent training for each player who trains for less than 1500 hours?
CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0))CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3))CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0))
SELECT pName, HS FROM Player WHERE HS < 1500
For those records from the products and each product's manufacturer, show me about the distribution of founder and the amount of founder , and group by attribute founder in a bar chart, and list total number in desc order please.
CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)
SELECT Founder, COUNT(Founder) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY COUNT(Founder) DESC
with a record of 73-82 what was the date?
CREATE TABLE table_11261 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text)
SELECT "Date" FROM table_11261 WHERE "Record" = '73-82'
who is at the top out of the riders ?
CREATE TABLE table_203_166 (id number,"pos" text,"no" number,"rider" text,"manufacturer" text,"laps" number,"time" text,"grid" number,"points" number)
SELECT "rider" FROM table_203_166 ORDER BY "pos" LIMIT 1
questions answers per hour for user.
CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat...
SELECT TIME_TO_STR(CreationDate, '%h') AS hour, COUNT(CASE WHEN PostTypeId = 1 THEN 1 END) AS questions, COUNT(CASE WHEN PostTypeId = 2 THEN 1 END) AS answers FROM Posts WHERE PostTypeId IN (1, 2) GROUP BY TIME_TO_STR(CreationDate, '%h')
For those records from the products and each product's manufacturer, find name and the average of revenue , and group by attribute name, and visualize them by a bar chart.
CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)
SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
what are the different card types, and how many transactions have been made with each?
CREATE TABLE Customers (customer_id INTEGER,customer_first_name VARCHAR(20),customer_last_name VARCHAR(20),customer_address VARCHAR(255),customer_phone VARCHAR(255),customer_email VARCHAR(255),other_customer_details VARCHAR(255))CREATE TABLE Financial_Transactions (transaction_id INTEGER,previous_transaction_id INTEGER...
SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code
What is To Par, when Player is 'Tommy Bolt'?
CREATE TABLE table_name_55 (to_par VARCHAR,player VARCHAR)
SELECT to_par FROM table_name_55 WHERE player = "tommy bolt"
Name the maximum wins for 68.75%
CREATE TABLE table_20326 ("Year" real,"Matches" real,"Wins" real,"Losses" real,"No Result" real,"Tied" real,"Success Rate" text,"Position" text,"Summary" text)
SELECT MAX("Wins") FROM table_20326 WHERE "Success Rate" = '68.75%'
What is the home team that played on M.C.G. grounds?
CREATE TABLE table_16388398_2 (home_team VARCHAR,ground VARCHAR)
SELECT home_team FROM table_16388398_2 WHERE ground = "M.C.G."
For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id, and show Y in desc order.
CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE ...
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC
What are the upper-level elective options for the Spring and Summer ?
CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_cr...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = '...
How many sitting Representatives are there in the New York 10 polling area?
CREATE TABLE table_18607 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT COUNT("Incumbent") FROM table_18607 WHERE "District" = 'New York 10'
What is the Date of the Competition with a Result of 3 0?
CREATE TABLE table_name_75 (date VARCHAR,result VARCHAR)
SELECT date FROM table_name_75 WHERE result = "3–0"
Who scored the most points in Game 49?
CREATE TABLE table_11960407_5 (high_points VARCHAR,game VARCHAR)
SELECT high_points FROM table_11960407_5 WHERE game = 49
Which entrant has a Mclaren m7c Chassis?
CREATE TABLE table_14649 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real)
SELECT "Entrant" FROM table_14649 WHERE "Chassis" = 'mclaren m7c'
On what date was the opponent the Miami Dolphins?
CREATE TABLE table_name_30 (date VARCHAR,opponent VARCHAR)
SELECT date FROM table_name_30 WHERE opponent = "miami dolphins"
Number of questions with ViewCount > nviews.
CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)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,LastEditorDisplayN...
WITH TaggedPosts AS (SELECT ViewCount FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%##tagSubstring?python##%'), MostViewedQuestions AS (SELECT Count = COUNT(*) FROM TaggedPosts WHERE ViewCount > '##nviews:int?10000##') SELECT Count, CAST(Count AS FLOAT(20, 5)) * 100.0 / (SELECT COUNT(*) FROM TaggedPosts) AS Percentil...
What is the tally with a total larger than 8, Waterford was the opposition?
CREATE TABLE table_13960 ("Rank" real,"Player" text,"County" text,"Tally" text,"Total" real,"Opposition" text)
SELECT "Tally" FROM table_13960 WHERE "Total" > '8' AND "Opposition" = 'waterford'
Which courses involve parts of Integ Microsys Lab and Health Care Markets and Public Policies , can you show me ?
CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TAB...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Health Care Markets and Public Policies%' OR course.description LIKE '%Health Care Markets and Public Policies%' OR course.name LIKE '%Health Care Markets and Public Pol...
What is the weight of the player from club panionios g.c. and was born on 1975-05-21?
CREATE TABLE table_79053 ("Name" text,"Pos." text,"Height" text,"Weight" text,"Date of Birth" text,"Club" text)
SELECT "Weight" FROM table_79053 WHERE "Club" = 'panionios g.c.' AND "Date of Birth" = '1975-05-21'
What player was drafted by the philadelphia union?
CREATE TABLE table_27735 ("Pick #" real,"MLS Team" text,"Player" text,"Position" text,"Affiliation" text)
SELECT "Player" FROM table_27735 WHERE "MLS Team" = 'Philadelphia Union'
What are the years of participation for pickerington north?
CREATE TABLE table_21685 ("School" text,"Years of Participation" text,"OCC Championships" real,"Last OCC Championship" text,"Last Outright OCC Championship" text)
SELECT "Years of Participation" FROM table_21685 WHERE "School" = 'Pickerington North'
What is the average lap of the race with a 23 finish?
CREATE TABLE table_15315 ("Year" text,"Start" text,"Qual" text,"Rank" text,"Finish" text,"Laps" real)
SELECT AVG("Laps") FROM table_15315 WHERE "Finish" = '23'
when did patient 015-910 come into the hospital for the last time during this year?
CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientu...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '015-910' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1
Tell what has the App(GS/Sub) of 14 (8/6)
CREATE TABLE table_name_70 (name VARCHAR,app_gs_sub_ VARCHAR)
SELECT name FROM table_name_70 WHERE app_gs_sub_ = "14 (8/6)"
For the verb dhoa, what is the 2VF?
CREATE TABLE table_name_75 (verb VARCHAR)
SELECT 2 AS __vf_ FROM table_name_75 WHERE verb = "dhoa"
Which episode 4 has a Star of anna powierza?
CREATE TABLE table_name_87 (episode_4 VARCHAR,star VARCHAR)
SELECT episode_4 FROM table_name_87 WHERE star = "anna powierza"
Which Season has 95 Points?
CREATE TABLE table_14917 ("Season" text,"Series" text,"Races" text,"Wins" text,"Podiums" text,"Points" text,"Final Placing" text)
SELECT "Season" FROM table_14917 WHERE "Points" = '95'
what chart position did the single with david bowie reach in the us ?
CREATE TABLE table_200_22 (id number,"year" number,"single" text,"peak chart positions\nger" number,"peak chart positions\nire" number,"peak chart positions\nuk" number,"peak chart positions\nus" number,"peak chart positions\nus\nmain" number,"peak chart positions\nus\ndance" number,"certifications\n(sales thresholds)"...
SELECT "peak chart positions\nus" FROM table_200_22 WHERE "single" = 'with david bowie'
give me the number of patients whose year of death is less than or equal to 2132 and drug name is sertraline?
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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2132.0" AND prescriptions.drug = "Sertraline"
What is Team, when Game is 77?
CREATE TABLE table_name_90 (team VARCHAR,game VARCHAR)
SELECT team FROM table_name_90 WHERE game = 77
Which city has spanish news on the website ultimahora.com ?
CREATE TABLE table_70836 ("Name" text,"Frequency" text,"Language" text,"City" text,"Website" text)
SELECT "City" FROM table_70836 WHERE "Language" = 'spanish' AND "Website" = 'ultimahora.com'
Who is sezen aksu's producer?
CREATE TABLE table_47475 ("Track" real,"Title" text,"Songwriter(s)" text,"Producer(s)" text,"Length" text)
SELECT "Producer(s)" FROM table_47475 WHERE "Songwriter(s)" = 'sezen aksu'
What was the purpose of the Quay test blast?
CREATE TABLE table_name_54 (purpose VARCHAR,name VARCHAR)
SELECT purpose FROM table_name_54 WHERE name = "quay"
What hour of the day I post the most answers.
CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score num...
SELECT TIME_TO_STR(p.CreationDate, '%h'), COUNT(*) FROM Posts AS p WHERE p.OwnerUserId = @UserId AND p.PostTypeId = 2 GROUP BY TIME_TO_STR(p.CreationDate, '%h')
What was Berlin when fk pirmasens was S dwest and westfalia herne was west?
CREATE TABLE table_51004 ("Year" real,"Nord" text,"West" text,"S\u00fcdwest" text,"Berlin" text)
SELECT "Berlin" FROM table_51004 WHERE "S\u00fcdwest" = 'fk pirmasens' AND "West" = 'westfalia herne'
Which Team classification has a Combination classification of egoi mart nez, and a Winner of tom boonen?
CREATE TABLE table_6000 ("Stage" text,"Winner" text,"General classification" text,"Points classification" text,"Mountains classification" text,"Combination classification" text,"Team classification" text)
SELECT "Team classification" FROM table_6000 WHERE "Combination classification" = 'egoi martínez' AND "Winner" = 'tom boonen'
Which series has a season premiere on January 3, 2007 with the most episodes?
CREATE TABLE table_11144 ("Season" real,"Episodes" real,"Originally aired" text,"Season Premiere" text,"Season Finale" text,"DVD release date" text)
SELECT MAX("Episodes") FROM table_11144 WHERE "Season Premiere" = 'january 3, 2007'
Who was the opposition at 11,682 excl. exhibition match?
CREATE TABLE table_name_39 (opposition VARCHAR,stadium VARCHAR)
SELECT opposition FROM table_name_39 WHERE stadium = "11,682 excl. exhibition match"
What is the Time when the Epicenter was Bam?
CREATE TABLE table_32293 ("Date" text,"Time" text,"Epicenter" text,"Magnitude" text,"Fatalities" text,"Name" text)
SELECT "Time" FROM table_32293 WHERE "Epicenter" = 'bam'
What is the interview number in Louisiana, and the swimsuit number is more than 9.1?
CREATE TABLE table_name_19 (interview VARCHAR,country VARCHAR,swimsuit VARCHAR)
SELECT COUNT(interview) FROM table_name_19 WHERE country = "louisiana" AND swimsuit > 9.1
Where Bolton Wanderers is the home team, who is the away team?
CREATE TABLE table_41721 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text,"Attendance" text)
SELECT "Away team" FROM table_41721 WHERE "Home team" = 'bolton wanderers'
what is days of hospital stay and death status of subject name elizabeth bateman?
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 (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,do...
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.name = "Elizabeth Bateman"
let me know the primary disease and name of the patient with patient id 7578.
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,itemid text,charttime text,flag text,value_unit text,label text,fluid ...
SELECT demographic.name, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "7578"
What is 1989, when 1999 is F, and when 1994 is 2R?
CREATE TABLE table_41090 ("Tournament" text,"1987" text,"1988" text,"1989" text,"1990" text,"1991" text,"1992" text,"1993" text,"1994" text,"1995" text,"1996" text,"1997" text,"1998" text,"1999" text,"2000" text,"2001" text,"2002" text,"2003" text,"Career SR" text,"Career Win-Loss" text)
SELECT "1989" FROM table_41090 WHERE "1999" = 'f' AND "1994" = '2r'
What was the winning score on 7 jun 1976?
CREATE TABLE table_name_4 (winning_score VARCHAR,date VARCHAR)
SELECT winning_score FROM table_name_4 WHERE date = "7 jun 1976"
What percentage of the votes did Obama get in the county where McCain got 3648 votes?
CREATE TABLE table_23747 ("County" text,"Obama%" text,"Obama#" real,"McCain%" text,"McCain#" real,"Total" real)
SELECT "Obama%" FROM table_23747 WHERE "McCain#" = '3648'
Have I taken any courses that are among the most difficult in the NERS department ?
CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE area (course_id int,area var...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'NERS' AND program_course.workload = (SELECT MAX(...
how many patients whose diagnoses long title is neonatal hypoglycemia and lab test category is chemistry?
CREATE TABLE diagnoses (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)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Neonatal hypoglycemia" AND lab."CATEGORY" = "Chemistry"
what was the length of stay of patient 15135's last hospital stay?
CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount numbe...
SELECT STRFTIME('%j', admissions.dischtime) - STRFTIME('%j', admissions.admittime) FROM admissions WHERE admissions.subject_id = 15135 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1
Opened prior to 1877 only 2.44km from Wellington, when did this station close?
CREATE TABLE table_name_6 (closed VARCHAR,opened VARCHAR,distance_from_wellington VARCHAR)
SELECT closed FROM table_name_6 WHERE opened < 1877 AND distance_from_wellington = "2.44km"
What is Dennis Kucinich, when Classification is 'Democrat'?
CREATE TABLE table_59428 ("Classification" text,"% of all" text,"John Kerry" text,"John Edwards" text,"Dennis Kucinich" text)
SELECT "Dennis Kucinich" FROM table_59428 WHERE "Classification" = 'democrat'
in the month of december are there any flights from ATLANTA to DENVER that stop in BOSTON
CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight_number int,departure_time int,departure_airline text,departure_flight_number int,stop_time int)CREATE TABLE e...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND CITY_2.cit...
What architecture type does the Ford Escort Wagon have?
CREATE TABLE table_name_73 (architecture VARCHAR,original_vehicle VARCHAR)
SELECT architecture FROM table_name_73 WHERE original_vehicle = "ford escort wagon"
when did patient 005-4471 first had the tube feeding residual discarded (ml) output since 08/08/2102?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,he...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-4471')) AND intakeoutput.cellpath LIKE '%output%'...
Questions where a given tag was added not by its author.
CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE PostsWithDeleted (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,Las...
SELECT q.Id AS "post_link", h.Text AS "edited_tags", q.OwnerUserId AS "user_link", q.CreationDate AS "post_date", h.UserId AS "user_link", h.CreationDate AS "edit_date" FROM PostHistory AS h, Posts AS q WHERE h.PostId = q.Id AND h.PostHistoryTypeId = 6 AND h.Text LIKE '%<' + '##Tag##' + '>%' AND h.UserId != q.OwnerUser...
What is the name of the 9th ranked common?
CREATE TABLE table_1449176_1 (common_of VARCHAR,rank VARCHAR)
SELECT common_of FROM table_1449176_1 WHERE rank = "9th"
What is Ryan McCay's speed that has a rank better than 8?
CREATE TABLE table_name_65 (speed VARCHAR,rank VARCHAR,rider VARCHAR)
SELECT speed FROM table_name_65 WHERE rank > 8 AND rider = "ryan mccay"
What Call sign has a City of license of higgston, ga?
CREATE TABLE table_name_95 (call_sign VARCHAR,city_of_license VARCHAR)
SELECT call_sign FROM table_name_95 WHERE city_of_license = "higgston, ga"
how many days after september 3rd did brian perform in stockholm ?
CREATE TABLE table_203_855 (id number,"date" text,"city" text,"venue" text,"member" text,"performance" text,"notes" text)
SELECT (SELECT "date" FROM table_203_855 WHERE "city" = 'stockholm') - 3
what is the number of patients born before 1821 who were discharged to skilled nursing facility?
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,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.dob_year < "1821"
What was the date that an away team score 11.22 (88)?
CREATE TABLE table_57405 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Date" FROM table_57405 WHERE "Away team score" = '11.22 (88)'
what are the number of years maine has participated ?
CREATE TABLE table_203_502 (id number,"team" text,"titles" number,"runner-up" number,"third place" number,"fourth place" number,"years participated" number)
SELECT "years participated" FROM table_203_502 WHERE "team" = 'maine'
When 100 g/mi (62 g/km) is the clean electric grid california (san francisco) how many vehicles are there?
CREATE TABLE table_27011 ("Vehicle" text,"Operating mode" text,"EPA rated All-electric range" text,"EPA rated combined fuel economy" text,"Clean electric grid California (San Francisco)" text,"U.S. national average electric mix" text,"Dirty electric grid Rocky Mountains (Denver)" text)
SELECT COUNT("Vehicle") FROM table_27011 WHERE "Clean electric grid California (San Francisco)" = '100 g/mi (62 g/km)'
Show all dates of transactions whose type code is 'SALE', and count them by a line chart, and list x axis from high to low order.
CREATE TABLE Lots (lot_id INTEGER,investor_id INTEGER,lot_details VARCHAR(255))CREATE TABLE Transactions_Lots (transaction_id INTEGER,lot_id INTEGER)CREATE TABLE Purchases (purchase_transaction_id INTEGER,purchase_details VARCHAR(255))CREATE TABLE Transactions (transaction_id INTEGER,investor_id INTEGER,transaction_typ...
SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE transaction_type_code = "SALE" ORDER BY date_of_transaction DESC
Show the number of customers for each gender. Show scatter chart.
CREATE TABLE Financial_Transactions (transaction_id INTEGER,account_id INTEGER,invoice_number INTEGER,transaction_type VARCHAR(15),transaction_date DATETIME,transaction_amount DECIMAL(19,4),transaction_comment VARCHAR(255),other_transaction_details VARCHAR(255))CREATE TABLE Order_Items (order_item_id INTEGER,order_id I...
SELECT gender, COUNT(*) FROM Customers GROUP BY gender
What is Quantity Made, when Manufacturer is 'Baldwin'?
CREATE TABLE table_name_3 (quantity_made VARCHAR,manufacturer VARCHAR)
SELECT quantity_made FROM table_name_3 WHERE manufacturer = "baldwin"
Show the position of players and the corresponding number of players.
CREATE TABLE player (player_id number,player text,years_played text,total_wl text,singles_wl text,doubles_wl text,team number)CREATE TABLE match_season (season number,player text,position text,country number,team number,draft_pick_number number,draft_class text,college text)CREATE TABLE team (team_id number,name text)C...
SELECT position, COUNT(*) FROM match_season GROUP BY position
What were the reasons that venues closed in the 1990s?
CREATE TABLE table_43486 ("Venue" text,"Location" text,"Environment" text,"Closed" text,"Reason" text)
SELECT "Reason" FROM table_43486 WHERE "Closed" = '1990s'