instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
give me morning flights from CHARLOTTE to BALTIMORE
CREATE TABLE code_description (code varchar,description text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id int,flight_number int,from_airport varchar,meal_code text,stops int,time...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'CHARLOTTE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BAL...
What is the wins when there are 5 losses, and against is more than 1205?
CREATE TABLE table_65747 ("Sunrayia FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real)
SELECT MAX("Wins") FROM table_65747 WHERE "Losses" = '5' AND "Against" > '1205'
What is the crowd total for glenferrie oval?
CREATE TABLE table_name_77 (crowd VARCHAR,venue VARCHAR)
SELECT COUNT(crowd) FROM table_name_77 WHERE venue = "glenferrie oval"
which opponent is from February 12?
CREATE TABLE table_77090 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Nets points" real,"Opponents" real,"Record" text,"Streak" text)
SELECT "Opponent" FROM table_77090 WHERE "Date" = 'february 12'
Search my own answer posts.... This query returns the linked list of your answers partially matching the entered body text. Search is not case sensitive. The UserID parameter is your user ID (by default prefilled with your user ID) and the PostText is the text which you want to search for.
CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,Cr...
SELECT Id AS "post_link", Score AS "score", CreationDate AS "creation_date" FROM Posts WHERE OwnerUserId = @MyUserID AND PostTypeId IN (2, 3) ORDER BY CreationDate DESC
Which female challengers featured in episode 28?
CREATE TABLE table_26527 ("Episode" real,"Contest" text,"Original airdate" text,"Challengers (Female)" text,"Challengers (Male)" text,"Events" text)
SELECT "Challengers (Female)" FROM table_26527 WHERE "Episode" = '28'
Which 3 UTR sequence has the GenBank ID at hq021440?
CREATE TABLE table_5222 ("Variant id" text,"5\u2019UTR splice" text,"Coding" text,"3\u2019UTR sequence" text,"GenBank id" text)
SELECT "3\u2019UTR sequence" FROM table_5222 WHERE "GenBank id" = 'hq021440'
what is the number of patients admitted in hospital before 2180 who had albumin, pleural lab test?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid 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,ethni...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2180" AND lab.label = "Albumin, Pleural"
What poll source administered their poll on June 14-16, 2010?
CREATE TABLE table_20032301_3 (poll_source VARCHAR,dates_administered VARCHAR)
SELECT poll_source FROM table_20032301_3 WHERE dates_administered = "June 14-16, 2010"
What nation did the speed skater that set a record in the 1000 metres event represent?
CREATE TABLE table_name_23 (nation VARCHAR,event VARCHAR)
SELECT nation FROM table_name_23 WHERE event = "1000 metres"
What was the report in Buenos Aires?
CREATE TABLE table_name_98 (report VARCHAR,location VARCHAR)
SELECT report FROM table_name_98 WHERE location = "buenos aires"
How many millions of people in the US watched the episode with season number 8?
CREATE TABLE table_23432 ("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)
SELECT "U.S. viewers (millions)" FROM table_23432 WHERE "No. in season" = '8'
Name the runs balls for wicket of 3rd for australia opponent
CREATE TABLE table_name_9 (runs__balls_ VARCHAR,wicket VARCHAR,opponent VARCHAR)
SELECT runs__balls_ FROM table_name_9 WHERE wicket = "3rd" AND opponent = "australia"
what is the unemployment rate where the market income per capita is $16,406?
CREATE TABLE table_25340 ("County" text,"Population" real,"Unemployment Rate" text,"Market Income Per Capita" text,"Poverty Rate" text,"Status" text)
SELECT "Unemployment Rate" FROM table_25340 WHERE "Market Income Per Capita" = '$16,406'
How many tries against have a losing bonus of 9?
CREATE TABLE table_46790 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text)
SELECT "Tries against" FROM table_46790 WHERE "Losing bonus" = '9'
how many patients on main drug stayed for more than 2 days at hospital?
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "2" AND prescriptions.drug_type = "MAIN"
What is the nssdc id for Echo 1?
CREATE TABLE table_24413 ("Satellite" text,"Launch date (UTC)" text,"Decay" text,"Mass(kg)" text,"Diameter(m)" text,"NSSDC ID" text,"Nation" text,"Usage" text)
SELECT "NSSDC ID" FROM table_24413 WHERE "Satellite" = 'Echo 1'
How many bypass boosters are there on the engine with slit exhaust ports and SPI is yes?
CREATE TABLE table_1522 ("Engine" text,"Exhaust Ports" text,"Bypass Ports" real,"Bypass Boosters" text,"SPI" text,"Tapered Grind" text,"Number on cyl." text)
SELECT "Bypass Boosters" FROM table_1522 WHERE "SPI" = 'Yes' AND "Exhaust Ports" = 'Slit'
find user by partial name match.
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,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans...
SELECT DisplayName AS "user_link", Reputation FROM Users WHERE DisplayName LIKE 'not%' ORDER BY Reputation DESC
What year has Stacy as the category and award of Best Reality Star in Social Media?
CREATE TABLE table_78768 ("Year" real,"Competition" text,"Awards" text,"Category" text,"Result" text)
SELECT MIN("Year") FROM table_78768 WHERE "Category" = 'stacy' AND "Awards" = 'best reality star in social media'
What was the average clean and jerk of all weightlifters who had a bodyweight smaller than 87.5 and a snatch of less than 95?
CREATE TABLE table_51388 ("Name" text,"Bodyweight" real,"Snatch" real,"Clean & jerk" real,"Total (kg)" real)
SELECT AVG("Clean & jerk") FROM table_51388 WHERE "Bodyweight" = '87.5' AND "Snatch" < '95'
Name the Israel Bowl for march 30, 2012
CREATE TABLE table_66748 ("Season" text,"Champion" text,"Runner Up" text,"Israel Bowl" text,"Venue" text,"Date" text,"Finals MVP" text)
SELECT "Israel Bowl" FROM table_66748 WHERE "Date" = 'march 30, 2012'
what is the number of patients whose diagnoses long title is intervertebral disc disorder with myelopathy, unspecified region and drug name is succinylcholine?
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)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Intervertebral disc disorder with myelopathy, unspecified region" AND prescriptions.drug = ...
What is the average round of the match with a draw result and a record of 4-4-1?
CREATE TABLE table_15517 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text)
SELECT AVG("Round") FROM table_15517 WHERE "Res." = 'draw' AND "Record" = '4-4-1'
On what date was the game at Lincoln Financial Field?
CREATE TABLE table_39070 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Record" text,"Attendance" text)
SELECT "Date" FROM table_39070 WHERE "Game site" = 'lincoln financial field'
Posts By User Where Parent Tags Like. Posts by a user with a parent post that has a tag containing a word
CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUser...
SELECT d.Id AS "post_link", a.Body, b.Tags, c.ViewCount FROM Posts AS a INNER JOIN Posts AS d ON a.ParentId = d.Id INNER JOIN Posts AS b ON a.ParentId = b.Id INNER JOIN Posts AS c ON a.ParentId = c.Id WHERE a.OwnerUserId = @UserID AND b.Tags LIKE '%##TagContains##%' ORDER BY c.ViewCount DESC
What is the 1994 finish for the Miami tournament?
CREATE TABLE table_44992 ("Tournament" text,"1990" text,"1991" text,"1992" text,"1993" text,"1994" text,"1995" text,"1996" text,"1997" text,"1998" text,"1999" text,"2000" text,"Career SR" text,"Career Win-Loss" text)
SELECT "1994" FROM table_44992 WHERE "Tournament" = 'miami'
last time, what drug was prescribed for patient 88659 in 10/last year?
CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_i...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 88659) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', prescriptions.startdate) = '10' ORD...
count the number of patients whose marital status is single and drug route is inhalation?
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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "SINGLE" AND prescriptions.route = "INHALATION"
On April 29, with a game larger than 2, what is the high points?
CREATE TABLE table_52347 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Series" text)
SELECT "High points" FROM table_52347 WHERE "Game" > '2' AND "Date" = 'april 29'
What was the score of the game played on May 9?
CREATE TABLE table_name_43 (score VARCHAR,date VARCHAR)
SELECT score FROM table_name_43 WHERE date = "may 9"
Compare the total number of locations in each location using a bar graph, rank from high to low by the y axis please.
CREATE TABLE performance (Performance_ID real,Date text,Host text,Location text,Attendance int)CREATE TABLE member (Member_ID text,Name text,Nationality text,Role text)CREATE TABLE member_attendance (Member_ID int,Performance_ID int,Num_of_Pieces int)
SELECT Location, COUNT(Location) FROM performance GROUP BY Location ORDER BY COUNT(Location) DESC
count the number of patients whose admission type is emergency and procedure icd9 code is 403?
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,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla...
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.icd9_code = "403"
What is the playoffs for the usl pro select league?
CREATE TABLE table_16109 ("Year" real,"Division" real,"League" text,"Regular Season" text,"Playoffs" text,"Open Cup" text)
SELECT "Playoffs" FROM table_16109 WHERE "League" = 'USL Pro Select League'
what is solo when total tackles is 6?
CREATE TABLE table_name_82 (solo VARCHAR,total_tackles VARCHAR)
SELECT solo FROM table_name_82 WHERE total_tackles = "6"
What is the date of injury when the injury is foot injury and the number of matches (total) is 1?
CREATE TABLE table_74145 ("Date" text,"Player" text,"Injury" text,"Date of injury" text,"Number of matches (Total)" text,"Source" text)
SELECT "Date of injury" FROM table_74145 WHERE "Injury" = 'Foot injury' AND "Number of matches (Total)" = '1'
Which Average has a Band of f?
CREATE TABLE table_40434 ("Band" text,"Value" text,"Ratio" text,"Ratio as %" text,"Average" text)
SELECT "Average" FROM table_40434 WHERE "Band" = 'f'
select users from Moldova, Romania with specific reputation and tags.
CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE CloseRea...
SELECT u.Id, u.DisplayName, u.Reputation, u.Location, u.WebsiteUrl, u.ProfileImageUrl, SUM(p.AnswerCount) AS "answers", p.Tags FROM Users AS u FULL OUTER JOIN Posts AS p ON u.Id = p.OwnerUserId WHERE (u.Location LIKE ('%' + @Location + '%') OR u.Location LIKE ('%Romania%')) AND u.Reputation > 223 AND p.AnswerCount > 0 ...
What is Winner, when Year is 2001?
CREATE TABLE table_name_34 (winner VARCHAR,year VARCHAR)
SELECT winner FROM table_name_34 WHERE year = 2001
What are the staff ids and genders of all staffs whose job title is Department Manager. Plot them as scatter chart.
CREATE TABLE Staff (staff_id INTEGER,staff_gender VARCHAR(1),staff_name VARCHAR(80))CREATE TABLE Staff_Department_Assignments (staff_id INTEGER,department_id INTEGER,date_assigned_from DATETIME,job_title_code VARCHAR(10),date_assigned_to DATETIME)CREATE TABLE Products (product_id INTEGER,product_type_code VARCHAR(10),p...
SELECT T1.staff_id, T1.staff_gender FROM Staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager"
What was the attendance at the game when the record was 35-46?
CREATE TABLE table_10125 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text)
SELECT "Attendance" FROM table_10125 WHERE "Record" = '35-46'
Evolution of the number of new users. Number of new users per days.
CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE ReviewTaskStates (Id number,Name text,D...
SELECT DATE(STR(YEAR(CreationDate)) + '-' + STR(MONTH(CreationDate)) + '-' + STR(DAY(CreationDate))) AS FullDate, COUNT(*) AS Total FROM Users GROUP BY STR(YEAR(CreationDate)) + '-' + STR(MONTH(CreationDate)) + '-' + STR(DAY(CreationDate)) ORDER BY FullDate DESC
Highest scoring questions and answers in Java/JavaScript tags.
CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE Badges (Id number,UserId number,N...
SELECT TagName, QuestionID AS "post_link", q_.Score AS "q_score", AnswerID AS "post_link", a_.Score AS "a_score" FROM (SELECT TagName, (SELECT q.Id FROM Posts AS q INNER JOIN PostTags AS qt ON q.Id = qt.PostId WHERE qt.TagId = t.Id ORDER BY q.Score DESC LIMIT 1) AS QuestionID, (SELECT a.Id FROM Posts AS a INNER JOIN Po...
what is the total when bronze is more than 1 and gold smaller than 1?
CREATE TABLE table_name_1 (total INTEGER,bronze VARCHAR,gold VARCHAR)
SELECT SUM(total) FROM table_name_1 WHERE bronze > 1 AND gold < 1
Which country has Spence in the name section?
CREATE TABLE table_name_6 (country VARCHAR,name VARCHAR)
SELECT country FROM table_name_6 WHERE name = "spence"
What is the English title when the original title is Die Qual Der Wahl?
CREATE TABLE table_19585 ("Number of episode" real,"Number of season" real,"Title (original)" text,"Title (English)" text,"Original air date" text)
SELECT "Title (English)" FROM table_19585 WHERE "Title (original)" = 'Die Qual der Wahl'
data sets for textual entailment
CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,jou...
SELECT DISTINCT dataset.datasetid FROM dataset, keyphrase, paperdataset, paperkeyphrase WHERE keyphrase.keyphrasename = 'textual entailment' AND paperdataset.datasetid = dataset.datasetid AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paperkeyphrase.paperid = paperdataset.paperid
What was the pic for Canada for player Yvon Bouillon earlier than 1974?
CREATE TABLE table_name_38 (pick INTEGER,player VARCHAR,nationality VARCHAR,year VARCHAR)
SELECT AVG(pick) FROM table_name_38 WHERE nationality = "canada" AND year < 1974 AND player = "yvon bouillon"
has any microbiology test been performed on patient 76637 until 02/2102?
CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)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...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76637) AND STRFTIME('%y-%m', microbiologyevents.charttime) <= '2102-02'
What is the team when the high assists was stephen curry (7) and the high points was monta ellis (27)?
CREATE TABLE table_29927 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Team" FROM table_29927 WHERE "High assists" = 'Stephen Curry (7)' AND "High points" = 'Monta Ellis (27)'
provide the number of patients whose death status is 0 and procedure icd9 code is 3897?
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)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te...
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.icd9_code = "3897"
What is 2002 when 2009 is 54.0?
CREATE TABLE table_29329 ("Greek national account" text,"1970" text,"1980" text,"1990" text,"1995" text,"1996" text,"1997" text,"1998" text,"1999" text,"2000" text,"2001 1" text,"2002" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text,"2013 2" t...
SELECT "2002" FROM table_29329 WHERE "2009" = '54.0'
How many lessons taught by staff whose first name has letter 'a' in it?
CREATE TABLE Staff (staff_id VARCHAR,first_name VARCHAR)CREATE TABLE Lessons (staff_id VARCHAR)
SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
Find the first names of students studying in room 108.
CREATE TABLE list (firstname VARCHAR,classroom VARCHAR)
SELECT firstname FROM list WHERE classroom = 108
provide the number of patients whose diagnoses short title is routine circumcision and drug route is ng.
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,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Routine circumcision" AND prescriptions.route = "NG"
What is the number for the international with 669 domestic earlier than 2005?
CREATE TABLE table_name_78 (international INTEGER,domestic VARCHAR,year VARCHAR)
SELECT AVG(international) FROM table_name_78 WHERE domestic = 669 AND year < 2005
What was the score of the match on April 23, 2007?
CREATE TABLE table_name_65 (score VARCHAR,date VARCHAR)
SELECT score FROM table_name_65 WHERE date = "april 23, 2007"
Name the venue for march 28, 2008
CREATE TABLE table_66749 ("Season" text,"Champion" text,"Runner Up" text,"Israel Bowl" text,"Venue" text,"Date" text,"Finals MVP" text)
SELECT "Venue" FROM table_66749 WHERE "Date" = 'march 28, 2008'
How many train stations are there?
CREATE TABLE station (Id VARCHAR)
SELECT COUNT(*) FROM station
what is the number of patients whose language is span and year of birth is less than 2052?
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,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "SPAN" AND demographic.dob_year < "2052"
What was the record the day David Weathers (15) had a save?
CREATE TABLE table_36423 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Save" text,"Record" text)
SELECT "Record" FROM table_36423 WHERE "Save" = 'david weathers (15)'
What is the fewest number of bronze medals won among the nations ranked 12 that won no gold medals and 1 medal overall?
CREATE TABLE table_name_51 (bronze INTEGER,gold VARCHAR,total VARCHAR,rank VARCHAR)
SELECT MIN(bronze) FROM table_name_51 WHERE total = 1 AND rank = "12" AND gold < 1
What is the sum of Week when there were 67,968 people in attendance?
CREATE TABLE table_41314 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text)
SELECT SUM("Week") FROM table_41314 WHERE "Attendance" = '67,968'
Name the least area
CREATE TABLE table_24574438_1 (area__km_2__ INTEGER)
SELECT MIN(area__km_2__) FROM table_24574438_1
What are the highest laps Kazuki Nakajima did with a Grid larger than 19?
CREATE TABLE table_34661 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT MAX("Laps") FROM table_34661 WHERE "Driver" = 'kazuki nakajima' AND "Grid" > '19'
What is the high lap total for mika salo with a grid greater than 17?
CREATE TABLE table_name_66 (laps INTEGER,driver VARCHAR,grid VARCHAR)
SELECT MAX(laps) FROM table_name_66 WHERE driver = "mika salo" AND grid > 17
Users in Valencia sorted by reputation.
CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate ...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%valencia%' OR UPPER(Location) LIKE '%VLC' ORDER BY Reputation DESC
What is the Community Band with a 4BCB Callsign?
CREATE TABLE table_50344 ("Callsign" text,"Area served" text,"Band" text,"Freq currently" text,"Purpose" text)
SELECT "Band" FROM table_50344 WHERE "Purpose" = 'community' AND "Callsign" = '4bcb'
How many instances are there of party in the situation where Robert Bauman is the incumbent politician?
CREATE TABLE table_1341690_20 (party VARCHAR,incumbent VARCHAR)
SELECT COUNT(party) FROM table_1341690_20 WHERE incumbent = "Robert Bauman"
Tell me the displacement for 1935-45
CREATE TABLE table_11717 ("Version" text,"Year" text,"Bore x stroke" text,"Displacement" text,"Power" text)
SELECT "Displacement" FROM table_11717 WHERE "Year" = '1935-45'
What is the Overall of the pick less than 20?
CREATE TABLE table_name_16 (overall VARCHAR,pick__number INTEGER)
SELECT overall FROM table_name_16 WHERE pick__number < 20
patients of either sex 18 _ 85 years of age
CREATE TABLE table_dev_56 ("id" int,"anemia" bool,"gender" string,"white_blood_cell_count_wbc" int,"hemoglobinopathy" bool,"major_hematological_conditions" bool,"laboratory_abnormality" bool,"hemoglobin_a1c_hba1c" float,"renal_disease" bool,"hematocrit_hct" float,"platelet_count" float,"hemoglobin_concentration" float,...
SELECT * FROM table_dev_56 WHERE age >= 18 AND age <= 85
What is the average number of wins before the season in 1906 where there were 0 draws?
CREATE TABLE table_35622 ("Season" real,"Team" text,"Wins" real,"Losses" real,"Draws" real)
SELECT AVG("Wins") FROM table_35622 WHERE "Season" < '1906' AND "Draws" < '0'
presence or history of active infection including hepatitis b
CREATE TABLE table_dev_7 ("id" int,"active_infection" bool,"macroalbuminuria" bool,"hemoglobin_a1c_hba1c" float,"hepatitis_b" bool,"fasting_blood_glucose_fbg" float,"creatinine_clearance_cl" float,"triglyceride_tg" float,"NOUSE" float)
SELECT * FROM table_dev_7 WHERE active_infection = 1 OR hepatitis_b = 1
patients with vitamin b12 deficiency, abnormal thyroid function, or personal history of either any clinically defined medical disorder or any clinically defined neurological / psychiatric disorder ( other than ad ) , including ( but not limited to ) :, stroke, brain lesions, , cerebrovascular condition, other neurodege...
CREATE TABLE table_train_124 ("id" int,"loss_of_consciousness" bool,"serum_glucose" bool,"myelosuppression" bool,"retinoids_hepatotoxic" bool,"pulmonary_disease" bool,"etiology" bool,"abnormal_thyroid_function" bool,"laboratory_abnormality" bool,"chest_pain" bool,"dsm_iv_criteria" bool,"neurodegenerative_disease" bool,...
SELECT * FROM table_train_124 WHERE vitamin_b12_deficiency = 1 OR abnormal_thyroid_function = 1 OR medical_disorder = 1 OR neurological_disease = 1 OR psychiatric_disease = 1 AND ad = 0 OR (stroke = 1 OR brain_lesions = 1 OR cerebrovascular_disease = 1 OR neurodegenerative_disease = 1 OR (head_injury = 1 OR loss_of_con...
What is the to par for the player who had a score of 70-72-70-69=281?
CREATE TABLE table_71684 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real)
SELECT "To par" FROM table_71684 WHERE "Score" = '70-72-70-69=281'
how many times is the model ge40lfr?
CREATE TABLE table_15848 ("Order Year" text,"Manufacturer" text,"Model" text,"Fleet Series (Quantity)" text,"Powertrain (Engine/Transmission)" text,"Fuel Propulsion" text)
SELECT COUNT("Manufacturer") FROM table_15848 WHERE "Model" = 'GE40LFR'
list the flights from PHILADELPHIA to SAN FRANCISCO via DALLAS
CREATE TABLE code_description (code varchar,description text)CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,country_name varchar,time_zone_code varchar,minimum_connect_time int)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_descript...
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 = 'SAN FRANCISCO' AND CIT...
find a flight from LONG BEACH to ST. LOUIS stopping in DALLAS
CREATE TABLE time_interval (period text,begin_time int,end_time int)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 TABLE days (days_code varchar,day_name varchar)CREATE TABLE flig...
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 = 'ST. LOUIS' AND CITY_2....
What result did Indiana have when they were an opponent?
CREATE TABLE table_44406 ("Date" text,"Opponent#" text,"Site" text,"Result" text,"Attendance" text)
SELECT "Result" FROM table_44406 WHERE "Opponent#" = 'indiana'
What is the lowest Year, when Rank is greater than 85?
CREATE TABLE table_name_28 (year INTEGER,rank INTEGER)
SELECT MIN(year) FROM table_name_28 WHERE rank > 85
when did patient 6215 during their last hospital encounter have the maximum asparate aminotransferase (ast) for the last time?
CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto ...
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6215 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = '...
how many patients whose death status is 1 and diagnoses icd9 code is 5733?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid 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,ethni...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.icd9_code = "5733"
What song placed higher than#4?
CREATE TABLE table_name_41 (song VARCHAR,place INTEGER)
SELECT song FROM table_name_41 WHERE place > 4
how many games have a location of memorial stadium and a time of 2:27?
CREATE TABLE table_name_95 (game VARCHAR,location VARCHAR,time VARCHAR)
SELECT COUNT(game) FROM table_name_95 WHERE location = "memorial stadium" AND time = "2:27"
What Social Democratic has a Democratic and Social Centre of 10.0% 22 seats?
CREATE TABLE table_65848 ("Date Released" text,"Institute" text,"Social Democratic" text,"Socialist" text,"Green-Communist" text,"Democratic Renewal" text,"Democratic and Social Centre" text,"Lead" text)
SELECT "Social Democratic" FROM table_65848 WHERE "Democratic and Social Centre" = '10.0% 22 seats'
give me the number of patients whose admission type is emergency and drug name is abacavir sulfate?
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 demographic (subject_id text,hadm_id text,name text,marital...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Abacavir Sulfate"
What is the average capacity that has rod laver arena as the stadium?
CREATE TABLE table_75088 ("Rank" text,"Stadium" text,"Capacity" real,"City" text,"Country" text,"Tournament hosted" text)
SELECT AVG("Capacity") FROM table_75088 WHERE "Stadium" = 'rod laver arena'
Questions with [tag] closed as duplicate.
CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE ReviewTask...
SELECT YEAR(ClosedDate) AS "year", COUNT(*) AS "questions" FROM Posts LEFT JOIN PostHistory AS PH ON PH.PostId = Posts.Id WHERE STR_POSITION(Tags, @tag) > 0 AND PostTypeId = 1 AND NOT ClosedDate IS NULL AND Comment = '101' GROUP BY YEAR(ClosedDate)
What is the lightest Weight (kg), when the Jersey # is greater than 22, when the Position is F, and when the Birthdate is March 19, 1980?
CREATE TABLE table_42273 ("Position" text,"Jersey #" real,"Name" text,"Height (cm)" real,"Weight (kg)" real,"Birthdate" text,"Birthplace" text,"1999\u20132000 Team" text,"NHL Rights" text)
SELECT MIN("Weight (kg)") FROM table_42273 WHERE "Jersey #" > '22' AND "Position" = 'f' AND "Birthdate" = 'march 19, 1980'
Users with more than 3k characters in About Me.
CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModera...
SELECT Id AS "user_link", LENGTH(AboutMe) AS "Length of About Me", AboutMe FROM Users WHERE LENGTH(AboutMe) > 3000 ORDER BY LENGTH(AboutMe) DESC
What are the years that had someone nominated for best supporting actress?
CREATE TABLE table_12302 ("Year" real,"Award Ceremony" text,"Category" text,"Nominee" text,"Result" text)
SELECT COUNT("Year") FROM table_12302 WHERE "Result" = 'nominated' AND "Category" = 'best supporting actress'
Tell me the number for height in ft of 6-7
CREATE TABLE table_54165 ("Player" text,"No.(s)" text,"Height in Ft." text,"Position" text,"Years for Rockets" text,"School/Club Team/Country" text)
SELECT "No.(s)" FROM table_54165 WHERE "Height in Ft." = '6-7'
Show me about the distribution of meter_200 and the sum of meter_100 , and group by attribute meter_200 in a bar chart.
CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE event (ID int,Name text,Stadium_ID int,Year ...
SELECT meter_200, SUM(meter_100) FROM swimmer GROUP BY meter_200
Who is the high rebounds for game 64?
CREATE TABLE table_23281862_9 (high_rebounds VARCHAR,game VARCHAR)
SELECT high_rebounds FROM table_23281862_9 WHERE game = 64
After 1971, what is the Rank with a Height ft (m) of 19.0 477 (145) and less than 35 Floors?
CREATE TABLE table_52861 ("Rank" text,"Name" text,"Height ft (m)" text,"Floors" real,"Year" real)
SELECT "Rank" FROM table_52861 WHERE "Year" > '1971' AND "Floors" < '35' AND "Height ft (m)" = '19.0 477 (145)'
has patient 72198 received any lab test until 06/2105.
CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE inputevents_cv (row_id number,subject_id number...
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 72198) AND STRFTIME('%y-%m', labevents.charttime) <= '2105-06'
How many silver medals were won with a total medal of 3 and a rank above 9?
CREATE TABLE table_name_49 (silver INTEGER,total VARCHAR,rank VARCHAR)
SELECT AVG(silver) FROM table_name_49 WHERE total < 3 AND rank > 9
on 12/26/this year, what was first value of sao2 for patient 006-47576?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text...
SELECT vitalperiodic.sao2 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-47576')) AND NOT vitalperiodic.sao2 IS NULL AND DATETIME(v...
presence of any unstable cardiovascular disease, uncontrolled diabetes, chronic inflammatory or infectious conditions. retinoids have been associated with chest pain of unclear etiology, increased serum glucose, myelosuppression and increased risk of infection.
CREATE TABLE table_train_124 ("id" int,"loss_of_consciousness" bool,"serum_glucose" bool,"myelosuppression" bool,"retinoids_hepatotoxic" bool,"pulmonary_disease" bool,"etiology" bool,"abnormal_thyroid_function" bool,"laboratory_abnormality" bool,"chest_pain" bool,"dsm_iv_criteria" bool,"neurodegenerative_disease" bool,...
SELECT * FROM table_train_124 WHERE cardiovascular_disease = 1 OR diabetes = 1 OR chronic_inflammatory = 1 OR active_infection = 1 OR (retinoids = 1 AND chest_pain = 1 AND etiology = 1 OR serum_glucose = 1 OR myelosuppression = 1 OR active_infection = 1)