instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Which Date has an Outcome of winner, and a Score of 7 5, 6 4?
CREATE TABLE table_name_69 (date VARCHAR,outcome VARCHAR,score VARCHAR)
SELECT date FROM table_name_69 WHERE outcome = "winner" AND score = "7–5, 6–4"
Who wrote the episode 'The Dream Lover', which was viewed by 3.96 million viewers?
CREATE TABLE table_21726 ("Series #" real,"Episode #" real,"Title" text,"Directed by" text,"Written by" text,"U.S. viewers (million)" text,"Original airdate" text,"Production Code" text)
SELECT "Written by" FROM table_21726 WHERE "U.S. viewers (million)" = '3.96'
What did the away team score when they were playing collingwood?
CREATE TABLE table_77775 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team score" FROM table_77775 WHERE "Home team" = 'collingwood'
Count the number of people of each sex who have a weight higher than 85 by a bar chart, and list y axis in ascending order.
CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)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)
SELECT Sex, COUNT(*) FROM people WHERE Weight > 85 GROUP BY Sex ORDER BY COUNT(*)
Show the number of male and female assistant professors.
CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)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 Faculty (FacID INTEGER,Lname VARCHAR(15),Fname VARCHAR(15),Rank VARCHAR(15),Sex VARCHAR(1),Phone IN...
SELECT Sex, COUNT(*) FROM Faculty WHERE Rank = "AsstProf" GROUP BY Sex
Which player went to Vanderbilt?
CREATE TABLE table_43493 ("Round" real,"Pick #" real,"Player" text,"Position" text,"College" text)
SELECT "Player" FROM table_43493 WHERE "College" = 'vanderbilt'
what is bb - blind bear where ba - running bear is mf - mountain falcon?
CREATE TABLE table_28265 ("AB - Angry boar" text,"B - Bishop" text,"BA - Running Bear" text,"BB - Blind Bear" text,"BC - Beast Cadet" text)
SELECT "BB - Blind Bear" FROM table_28265 WHERE "BA - Running Bear" = 'MF - Mountain Falcon'
How many original air dates totaled 26.06 million viewers?
CREATE TABLE table_18217753_1 (original_air_date VARCHAR,us_viewers__millions_ VARCHAR)
SELECT COUNT(original_air_date) FROM table_18217753_1 WHERE us_viewers__millions_ = "26.06"
For the 2nd string of Ra what is the Depart de la main gauche?
CREATE TABLE table_76891 ("Mode" text,"D\u00e9part de la main gauche" text,"Accord du 1st string" text,"2nd string" text,"3rd string" text)
SELECT "D\u00e9part de la main gauche" FROM table_76891 WHERE "2nd string" = 'ra'
What is Joanne Carner's average score in Canadian Women's Open games that she has won?
CREATE TABLE table_name_70 (score INTEGER,champion VARCHAR)
SELECT AVG(score) FROM table_name_70 WHERE champion = "joanne carner"
Which college's overall number is more than 158 when Travian Robertson is the name?
CREATE TABLE table_name_87 (college VARCHAR,overall VARCHAR,name VARCHAR)
SELECT college FROM table_name_87 WHERE overall > 158 AND name = "travian robertson"
since 04/2105, when was patient 27172 prescribed for the first time for a drug?
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 admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admissi...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27172) AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-04' ORDER BY prescriptions.startdate LIMIT 1
until 3 years ago how many patients received therapeutic antibacterials - fourth generation cephalosporin during the same month after the diagnosis of hypotension.
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 COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypotension' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t1 JOIN (SELEC...
What was the result of the game played on April 16 with Philadelphia as home team?
CREATE TABLE table_name_64 (result VARCHAR,home_team VARCHAR,date VARCHAR)
SELECT result FROM table_name_64 WHERE home_team = "philadelphia" AND date = "april 16"
Number (count) of active users by reputation.
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 Reputation, COUNT(Id) FROM Users WHERE LastAccessDate > DATEADD(month, '##maxMonthsInactive:int?3##' * -1, CURRENT_TIMESTAMP()) AND Reputation >= '##minReputation:int?2##' GROUP BY Reputation ORDER BY Reputation
What is the highest amount of gold medals awarded to a team with more than 9 silver, 7 bronze and more than 13 medals total?
CREATE TABLE table_7332 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT MAX("Gold") FROM table_7332 WHERE "Total" > '13' AND "Silver" > '9' AND "Bronze" = '7'
did patient 13528 have osteoarthros nos-unspec diagnosed since 2 years ago?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)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 inputevents_cv (row_...
SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'osteoarthros nos-unspec') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13528) AND DATETIME(diagnoses...
What is Mike Weir's To par?
CREATE TABLE table_name_79 (to_par VARCHAR,player VARCHAR)
SELECT to_par FROM table_name_79 WHERE player = "mike weir"
What 10:00 has party of five as 9:30?
CREATE TABLE table_35757 ("7:00" text,"7:30" text,"8:00" text,"8:30" text,"9:00" text,"9:30" text,"10:00" text,"10:30" text)
SELECT "10:00" FROM table_35757 WHERE "9:30" = 'party of five'
what were the three most frequently prescribed drugs since 2105?
CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)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 admissions (r...
SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE STRFTIME('%y', prescriptions.startdate) >= '2105' GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 3
what are the five most frequently ordered microbiology tests for patients who received insulin earlier in the same hospital visit until 2101?
CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientu...
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'insulin' ...
What is the mean Founded number when the team is the Baton Rouge Blaze?
CREATE TABLE table_name_96 (founded INTEGER,team VARCHAR)
SELECT AVG(founded) FROM table_name_96 WHERE team = "baton rouge blaze"
Which Year has a Competition of european indoor championships, and a Venue of budapest , hungary?
CREATE TABLE table_name_80 (year INTEGER,competition VARCHAR,venue VARCHAR)
SELECT SUM(year) FROM table_name_80 WHERE competition = "european indoor championships" AND venue = "budapest , hungary"
Which Country has a Year larger than 1978, and a Score of 295, and a Venue of lindrick golf club?
CREATE TABLE table_name_16 (country VARCHAR,venue VARCHAR,year VARCHAR,score VARCHAR)
SELECT country FROM table_name_16 WHERE year > 1978 AND score = "295" AND venue = "lindrick golf club"
How many males have a percentage of 80.62?
CREATE TABLE table_name_82 (males VARCHAR,percentage___percentage_ VARCHAR)
SELECT males FROM table_name_82 WHERE percentage___percentage_ = "80.62"
What was their record on December 4?
CREATE TABLE table_name_1 (record VARCHAR,date VARCHAR)
SELECT record FROM table_name_1 WHERE date = "december 4"
What is the result for 2004 when A is the result for 2005, and the result of q1 when 2009?
CREATE TABLE table_50386 ("Tournament" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text)
SELECT "2004" FROM table_50386 WHERE "2005" = 'a' AND "2009" = 'q1'
What is the club or province of Girvan Dempsey, who has 74 caps?
CREATE TABLE table_78299 ("Player" text,"Position" text,"Date of Birth (Age)" text,"Caps" real,"Club/province" text)
SELECT "Club/province" FROM table_78299 WHERE "Caps" = '74' AND "Player" = 'girvan dempsey'
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and salary .
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2)...
SELECT PHONE_NUMBER, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
Compare the total number of locations in each location using a bar graph, and order by the Y-axis from low to high.
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)CREATE TABLE performance (Performance_ID real,Date text,Host text,Location text,Attendance int)
SELECT Location, COUNT(Location) FROM performance GROUP BY Location ORDER BY COUNT(Location)
Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.
CREATE TABLE phone (Hardware_Model_name VARCHAR,Company_name VARCHAR,Accreditation_type VARCHAR)
SELECT Hardware_Model_name, Company_name FROM phone WHERE Accreditation_type LIKE 'Full'
What is the attendance of the match on October 26?
CREATE TABLE table_name_16 (attendance VARCHAR,date VARCHAR)
SELECT attendance FROM table_name_16 WHERE date = "october 26"
What is 2010 when 2003 is 5.6?
CREATE TABLE table_27146868_1 (Id VARCHAR)
SELECT 2010 FROM table_27146868_1 WHERE 2003 = "5.6"
What are the names and ids of the tourist attractions that are visited at most once. Visualize by bar chart.
CREATE TABLE Ref_Hotel_Star_Ratings (star_rating_code CHAR(15),star_rating_description VARCHAR(80))CREATE TABLE Museums (Museum_ID INTEGER,Museum_Details VARCHAR(255))CREATE TABLE Tourist_Attractions (Tourist_Attraction_ID INTEGER,Attraction_Type_Code CHAR(15),Location_ID INTEGER,How_to_Get_There VARCHAR(255),Name VARC...
SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID
What school has oregon as the state, and ashland as the city?
CREATE TABLE table_name_37 (school VARCHAR,state VARCHAR,city VARCHAR)
SELECT school FROM table_name_37 WHERE state = "oregon" AND city = "ashland"
For each file format, return the number of artists who released songs in that format.
CREATE TABLE files (f_id number(10),artist_name varchar2(50),file_size varchar2(20),duration varchar2(20),formats varchar2(20))CREATE TABLE song (song_name varchar2(50),artist_name varchar2(50),country varchar2(20),f_id number(10),genre_is varchar2(20),rating number(10),languages varchar2(20),releasedate Date,resolutio...
SELECT formats, COUNT(*) FROM files GROUP BY formats
after what year were austevoll mayors affiliated with political parties ?
CREATE TABLE table_201_10 (id number,"#" number,"name" text,"office" text,"political party" text,"occupation" text)
SELECT "office" FROM table_201_10 WHERE "political party" IS NULL ORDER BY "office" DESC LIMIT 1
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of headquarter and the sum of revenue , and group by attribute headquarter, and I want to rank total number in asc order.
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 Headquarter, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY SUM(Revenue)
Question Views by Hour (last 2 years).
CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location tex...
SELECT DATEPART(hour, CreationDate) AS Hour, AVG(CAST(ViewCount AS FLOAT)) AS "average_views" FROM Posts WHERE PostTypeId = 1 AND CreationDate > DATEADD(year, -2, GETUTCDATE()) GROUP BY DATEPART(hour, CreationDate) ORDER BY Hour
How many patients were admitted as transfer from hosp/extram before the year 2163?
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.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.admityear < "2163"
how many patients less than 61 years were admitted to hospital for more than 23 days?
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 WHERE demographic.age < "61" AND demographic.days_stay > "23"
What's the number of positions of the player playing in Minnesota North Stars?
CREATE TABLE table_1965650_4 (position VARCHAR,nhl_team VARCHAR)
SELECT COUNT(position) FROM table_1965650_4 WHERE nhl_team = "Minnesota North Stars"
List user with Deputy badge and less than 10K reputation.. List user with Deputy badge with no access to moderation tools
CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate ti...
SELECT UserId AS "user_link" FROM Badges INNER JOIN Users ON Users.Id = Badges.UserId WHERE Name LIKE 'Deputy' AND Reputation < 10000
I want to know the opponent that ha a week of 3
CREATE TABLE table_52631 ("Week" text,"Opponent" text,"Result" text,"Game site" text,"Time" text,"Attendance" text)
SELECT "Opponent" FROM table_52631 WHERE "Week" = '3'
Which Slalom has a Super G of 4?
CREATE TABLE table_7036 ("Season" real,"Overall" text,"Slalom" text,"Giant Slalom" text,"Super G" text,"Downhill" text,"Combined" text)
SELECT "Slalom" FROM table_7036 WHERE "Super G" = '4'
What School did Player Alonzo Mourning attend?
CREATE TABLE table_name_74 (school VARCHAR,player VARCHAR)
SELECT school FROM table_name_74 WHERE player = "alonzo mourning"
Tell me the total number of gold for total less than 1
CREATE TABLE table_4378 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT COUNT("Gold") FROM table_4378 WHERE "Total" < '1'
What skip has denmark as the country?
CREATE TABLE table_name_58 (skip VARCHAR,country VARCHAR)
SELECT skip FROM table_name_58 WHERE country = "denmark"
What is Date of Birth, when Height is 'Head Coach: Adel Shamala'?
CREATE TABLE table_78691 ("Name" text,"Pos." text,"Height" text,"Weight" text,"Date of Birth" text,"Club" text)
SELECT "Date of Birth" FROM table_78691 WHERE "Height" = 'head coach: adel shamala'
What is Score, when Team is '@ Memphis'?
CREATE TABLE table_name_29 (score VARCHAR,team VARCHAR)
SELECT score FROM table_name_29 WHERE team = "@ memphis"
Which tie number has Bolton Wanderers as away?
CREATE TABLE table_43538 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text)
SELECT "Tie no" FROM table_43538 WHERE "Away team" = 'bolton wanderers'
tb of organ nec-histo dx what does it stand for?
CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)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 cost (row_id number,subject_id number,hadm_id number,event_type t...
SELECT d_icd_diagnoses.long_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'tb of organ nec-histo dx' UNION SELECT d_icd_procedures.long_title FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'tb of organ nec-histo dx'
#SOreadytohelp winners - week 1.
CREATE TABLE PostTypes (Id number,Name text)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)CR...
SELECT Id AS "user_link" FROM Users WHERE DisplayName LIKE '%tehran%' LIMIT 1000
What is the date in which a politician who left office on 1840-10-11 for a politician whose election number was 11?
CREATE TABLE table_28607 ("Election number" real,"Election date" text,"District" text,"Province" text,"Took office" text,"Left office" text)
SELECT "Left office" FROM table_28607 WHERE "Election number" = '11'
Which opponent has a record of 17-11?
CREATE TABLE table_name_86 (opponent VARCHAR,record VARCHAR)
SELECT opponent FROM table_name_86 WHERE record = "17-11"
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the average of code , and group by attribute name.
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, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
Posts where last event was CW-ification.
CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,R...
SELECT ph.PostId AS "post_link", revisions = 'site://posts/' + CAST(ph.PostId AS TEXT) + '/revisions' FROM PostHistory AS ph WHERE (ph.PostHistoryTypeId = 16) AND ph.Id IN (SELECT MAX(Id) AS last FROM PostHistory GROUP BY PostId) ORDER BY ph.PostId DESC
What is the lowest salary in departments with average salary greater than the overall average.
CREATE TABLE course (course_id text,title text,dept_name text,credits number)CREATE TABLE section (course_id text,sec_id text,semester text,year number,building text,room_number text,time_slot_id text)CREATE TABLE teaches (id text,course_id text,sec_id text,semester text,year number)CREATE TABLE prereq (course_id text,...
SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor)
for patients id 83678, specify the time and type of admission
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,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex...
SELECT demographic.admission_type, demographic.admittime FROM demographic WHERE demographic.subject_id = "83678"
How many different jobs are listed?
CREATE TABLE person (name text,age number,city text,gender text,job text)CREATE TABLE personfriend (name text,friend text,year number)
SELECT COUNT(DISTINCT job) FROM person
what is the total number of albus from this chart that made the billboard 200 ?
CREATE TABLE table_203_77 (id number,"album title" text,"format" text,"year" number,"original label" text,"chart positions" text)
SELECT COUNT("album title") FROM table_203_77 WHERE NOT "chart positions" IS NULL
What is Glider, when Speed is '147.3km/h'?
CREATE TABLE table_name_40 (glider VARCHAR,speed VARCHAR)
SELECT glider FROM table_name_40 WHERE speed = "147.3km/h"
What are the names of all female candidates in alphabetical order (sex is F)?
CREATE TABLE people (people_id number,sex text,name text,date_of_birth text,height number,weight number)CREATE TABLE candidate (candidate_id number,people_id number,poll_source text,date text,support_rate number,consider_rate number,oppose_rate number,unsure_rate number)
SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name
WHAT IS THE RESULT WITH THE BOSTON ROAD TEAM, ON APRIL 23?
CREATE TABLE table_76827 ("Game" text,"Date" text,"Home Team" text,"Result" text,"Road Team" text)
SELECT "Result" FROM table_76827 WHERE "Road Team" = 'boston' AND "Date" = 'april 23'
Which date had a game with the New York Giants as the winner, year over 1985, and a result of 17-14?
CREATE TABLE table_46272 ("Year" real,"Date" text,"Winner" text,"Result" text,"Loser" text,"Location" text)
SELECT "Date" FROM table_46272 WHERE "Winner" = 'new york giants' AND "Year" > '1985' AND "Result" = '17-14'
What engine did Scuderia Ambrosiana with fewer than 4 points have?
CREATE TABLE table_69943 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real)
SELECT "Engine" FROM table_69943 WHERE "Entrant" = 'scuderia ambrosiana' AND "Points" < '4'
Which Supplier have a Basic shape of flat, a Wrist pad of no, and Keys (x modes) of 25+?
CREATE TABLE table_name_16 (supplier VARCHAR,keys__x_modes_ VARCHAR,basic_shape VARCHAR,wrist_pad VARCHAR)
SELECT supplier FROM table_name_16 WHERE basic_shape = "flat" AND wrist_pad = "no" AND keys__x_modes_ = "25+"
How many gold medals for germany (GER) having a rank less than 15?
CREATE TABLE table_name_64 (gold VARCHAR,nation VARCHAR,rank VARCHAR)
SELECT COUNT(gold) FROM table_name_64 WHERE nation = "germany (ger)" AND rank < 15
What score has vancouver as the home, and february 16 as the date?
CREATE TABLE table_37848 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text)
SELECT "Score" FROM table_37848 WHERE "Home" = 'vancouver' AND "Date" = 'february 16'
what is the total number of english titles ?
CREATE TABLE table_204_307 (id number,"year" number,"english title" text,"chinese title" text,"role" text,"notes" text)
SELECT COUNT("english title") FROM table_204_307
Who was the opponent at the game that had a loss of Bell (6 9)?
CREATE TABLE table_15206 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text)
SELECT "Opponent" FROM table_15206 WHERE "Loss" = 'bell (6–9)'
When Essendon was the Home Team, what was the Away Team score?
CREATE TABLE table_78319 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team score" FROM table_78319 WHERE "Home team" = 'essendon'
Name the number in season for 4300062
CREATE TABLE table_21165255_1 (no_in_season INTEGER,production_code VARCHAR)
SELECT MAX(no_in_season) FROM table_21165255_1 WHERE production_code = 4300062
What is the value in 1965 when 7 is the value for 1967?
CREATE TABLE table_42325 ("1965" text,"1966" text,"1967" text,"1968" text,"1969" text,"1970" text,"1971" text,"1972" text)
SELECT "1965" FROM table_42325 WHERE "1967" = '7'
What is the cost per capita in the Courtenay municipality?
CREATE TABLE table_12340907_1 (cost_per_capita VARCHAR,municipality VARCHAR)
SELECT cost_per_capita FROM table_12340907_1 WHERE municipality = "Courtenay"
What is the played total when the points against was 321?
CREATE TABLE table_13564637_4 (played VARCHAR,points_against VARCHAR)
SELECT played FROM table_13564637_4 WHERE points_against = "321"
For those employees who was hired before 2002-06-21, find hire_date and the average of manager_id bin hire_date by weekday, and visualize them by a bar chart.
CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE jobs (JOB_ID v...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21'
How many countries spent $83.7 billion on international tourism in 2012?
CREATE TABLE table_31341 ("Rank 2012" real,"Country" text,"UNWTO Region" text,"International tourism expenditure 2011" text,"International tourism expenditure 2012" text,"% change" text)
SELECT COUNT("% change") FROM table_31341 WHERE "International tourism expenditure 2012" = '$83.7 billion'
what procedure did patient 64873 undergo for the first time since 3 years ago?
CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 64873) AND DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TI...
At a Saginaw fare of $470.47, what is the fare to Lansing?
CREATE TABLE table_20700 ("Year" real,"Lansing (LAN)" text,"Detroit (DTW)" text,"Grand Rapids (GRR)" text,"Flint (FNT)" text,"Kalamazoo (AZO)" text,"Saginaw (MBS)" text)
SELECT "Lansing (LAN)" FROM table_20700 WHERE "Saginaw (MBS)" = '$470.47'
What is the address of the Life & Casualty Tower?
CREATE TABLE table_name_94 (street_address VARCHAR,name VARCHAR)
SELECT street_address FROM table_name_94 WHERE name = "life & casualty tower"
Which examples ask the existential question 'Can I Love?
CREATE TABLE table_65 ("Approximate Age" text,"Virtues" text,"Psycho Social Crisis" text,"Significant Relationship" text,"Existential Question [ not in citation given ]" text,"Examples" text)
SELECT "Examples" FROM table_65 WHERE "Existential Question [ not in citation given ]" = 'Can I Love?'
if the geez is libb, what is the akkadian?
CREATE TABLE table_74052 ("English" text,"Proto-Semitic" text,"Akkadian" text,"Arabic" text,"Aramaic" text,"Hebrew" text,"Geez" text,"Mehri" text)
SELECT "Akkadian" FROM table_74052 WHERE "Geez" = 'libb'
How many type of jobs do they have?
CREATE TABLE Person (job VARCHAR)
SELECT COUNT(DISTINCT job) FROM Person
What is the score of the game played on october 16?
CREATE TABLE table_3877 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Score" FROM table_3877 WHERE "Date" = 'October 16'
give me the number of patients whose days of hospital stay is greater than 1 and lab test fluid is urine?
CREATE TABLE procedures (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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "1" AND lab.fluid = "Urine"
how many patients were prescribed furosemide 20 mg po tabs within the same month since 5 years ago following the procedure of oxygen therapy (40% to 60%)?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,disch...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'oxygen therapy (40% to 60%)' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-5 year')) A...
What is the winery at which the wine with the highest score was made?
CREATE TABLE wine (no number,grape text,winery text,appelation text,state text,name text,year number,price number,score number,cases number,drink text)CREATE TABLE appellations (no number,appelation text,county text,state text,area text,isava text)CREATE TABLE grapes (id number,grape text,color text)
SELECT winery FROM wine ORDER BY score LIMIT 1
What date did Collingwood play as the home team?
CREATE TABLE table_name_75 (date VARCHAR,home_team VARCHAR)
SELECT date FROM table_name_75 WHERE home_team = "collingwood"
How many appointed archbishops were ordained as priests on December 20, 1959
CREATE TABLE table_1656555_1 (Appointed VARCHAR,ordained_priest VARCHAR)
SELECT COUNT(Appointed) AS archbishop FROM table_1656555_1 WHERE ordained_priest = "December 20, 1959"
how many christian contemporary stations are there ?
CREATE TABLE table_203_657 (id number,"call sign" text,"frequency" text,"city of license" text,"licensee" text,"format" text)
SELECT COUNT(*) FROM table_203_657 WHERE "format" = 'christian contemporary'
What rank has a status of proposed, with 80 floors for Celestia Spaces 4?
CREATE TABLE table_name_79 (rank INTEGER,name VARCHAR,status VARCHAR,floors VARCHAR)
SELECT AVG(rank) FROM table_name_79 WHERE status = "proposed" AND floors = 80 AND name = "celestia spaces 4"
Who had the time 13.6?
CREATE TABLE table_name_76 (athlete VARCHAR,time VARCHAR)
SELECT athlete FROM table_name_76 WHERE time = 13.6
What is The Melbourne with a No- Gold Coast
CREATE TABLE table_name_67 (melbourne VARCHAR,gold_coast VARCHAR)
SELECT melbourne FROM table_name_67 WHERE gold_coast = "no"
What is the position of john charles?
CREATE TABLE table_12165135_1 (position VARCHAR,player VARCHAR)
SELECT position FROM table_12165135_1 WHERE player = "John Charles"
Which opponent in the final had a partner of Katarina Srebotnik and a championship of wimbledon (4)?
CREATE TABLE table_name_63 (opponents_in_the_final VARCHAR,partner VARCHAR,championship VARCHAR)
SELECT opponents_in_the_final FROM table_name_63 WHERE partner = "katarina srebotnik" AND championship = "wimbledon (4)"
How many patients had other body fluid as lab test fluid and were admitted on an urgent basis?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.fluid = "Other Body Fluid"
which election cycle yielded more parliament seats won : 1994 , or 2001 ?
CREATE TABLE table_204_28 (id number,"election" text,"name of the party/alliance" text,"number of votes" number,"percentage" text,"seats in the parliament" number)
SELECT "election" FROM table_204_28 WHERE "election" IN (1994, 2001) ORDER BY "seats in the parliament" DESC LIMIT 1
Who was the away team at Victoria Park?
CREATE TABLE table_name_1 (away_team VARCHAR,venue VARCHAR)
SELECT away_team FROM table_name_1 WHERE venue = "victoria park"
What Song's Index is F6?
CREATE TABLE table_name_58 (song VARCHAR,index VARCHAR)
SELECT song FROM table_name_58 WHERE index = "f6"