instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What was the date of the game that was played against Laura Golarsa?
CREATE TABLE table_6979 ("Date" text,"Tournament" text,"Surface" text,"Partnering" text,"Opponents in the final" text,"Score" text)
SELECT "Date" FROM table_6979 WHERE "Partnering" = 'laura golarsa'
What is the to par of the match with a winning score 69-67-72-64=272?
CREATE TABLE table_name_25 (to_par VARCHAR,winning_score VARCHAR)
SELECT to_par FROM table_name_25 WHERE winning_score = 69 - 67 - 72 - 64 = 272
What is Manufacturer, when Quantity Made is 2, and when Year Made is 1884?
CREATE TABLE table_name_25 (manufacturer VARCHAR,quantity_made VARCHAR,year_made VARCHAR)
SELECT manufacturer FROM table_name_25 WHERE quantity_made = "2" AND year_made = "1884"
Name the lms number for serial number being 372
CREATE TABLE table_20236726_2 (lms_no VARCHAR,serial_no VARCHAR)
SELECT lms_no FROM table_20236726_2 WHERE serial_no = 372
What is the manufacturer serial number of the 1963 withdrawn year?
CREATE TABLE table_name_86 (manufacturer_serial_numbers VARCHAR,year_s__withdrawn VARCHAR)
SELECT manufacturer_serial_numbers FROM table_name_86 WHERE year_s__withdrawn = "1963"
How many episodes in the season had production code of 175255?
CREATE TABLE table_27755040_1 (no_in_season VARCHAR,production_code VARCHAR)
SELECT COUNT(no_in_season) FROM table_27755040_1 WHERE production_code = 175255
What was part 2 when part 4 was *bl tanaz?
CREATE TABLE table_name_67 (part_2 VARCHAR,part_4 VARCHAR)
SELECT part_2 FROM table_name_67 WHERE part_4 = "*blōtanaz"
Which of the entrants had Luigi Fagioli as a driver?
CREATE TABLE table_57163 ("Entrant" text,"Constructor" text,"Chassis" text,"Driver" text,"Rounds" text)
SELECT "Entrant" FROM table_57163 WHERE "Driver" = 'luigi fagioli'
What is the class of the Charlotte Camel gt 500 race?
CREATE TABLE table_36396 ("Race" text,"Length" text,"Class" text,"Circuit" text,"Date" text)
SELECT "Class" FROM table_36396 WHERE "Race" = 'charlotte camel gt 500'
how many tracks in word ... life have only lord finesse as a producer ?
CREATE TABLE table_203_228 (id number,"#" number,"title" text,"songwriters" text,"producer(s)" text,"performer (s)" text)
SELECT COUNT("title") FROM table_203_228 WHERE "producer(s)" = 'lord finesse'
If Crazy In Love is the song choice, what is the theme?
CREATE TABLE table_22736523_1 (theme VARCHAR,song_choice VARCHAR)
SELECT theme FROM table_22736523_1 WHERE song_choice = "Crazy In Love"
In what year was 1.35% the average vote per candidate?
CREATE TABLE table_30772 ("Year" text,"Candidates" real,"Total votes" real,"Average votes per candidate" real,"% of total vote" text,"Average % of vote per candidate" text,"Saved Deposits" real,"Number of MPs" real)
SELECT "Year" FROM table_30772 WHERE "Average % of vote per candidate" = '1.35'
What is the quantity preserved for the serial number of mallet and simple articulated locomotives?
CREATE TABLE table_name_19 (quantity_preserved VARCHAR,serial_numbers VARCHAR)
SELECT quantity_preserved FROM table_name_19 WHERE serial_numbers = "mallet and simple articulated locomotives"
provide the number of patients admitted in hospital before the year 2133 who have lab test item id 51132.
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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2133" AND lab.itemid = "51132"
What is the build date when total produced is 2?
CREATE TABLE table_70734 ("Model" text,"Build date" text,"Total produced" real,"Wheel arrangement" text,"Prime mover" text,"Power output" text)
SELECT "Build date" FROM table_70734 WHERE "Total produced" = '2'
In what stadium was the friendly match on 2 June 1992 played in?
CREATE TABLE table_name_2 (venue VARCHAR,competition VARCHAR,date VARCHAR)
SELECT venue FROM table_name_2 WHERE competition = "friendly match" AND date = "2 june 1992"
What type of award is the theatre world award?
CREATE TABLE table_11020 ("Year" real,"Award" text,"Category" text,"Work" text,"Result" text)
SELECT "Award" FROM table_11020 WHERE "Category" = 'theatre world award'
Which Selection has a College of texas a&m?
CREATE TABLE table_name_71 (selection INTEGER,college VARCHAR)
SELECT SUM(selection) FROM table_name_71 WHERE college = "texas a&m"
In the WCHL League, what is the last Assists with less than 65 Goals?
CREATE TABLE table_name_37 (assists INTEGER,league VARCHAR,goals VARCHAR)
SELECT MIN(assists) FROM table_name_37 WHERE league = "wchl" AND goals < 65
How many grids did Shinichi Nakatomi ride in?
CREATE TABLE table_name_46 (grid INTEGER,rider VARCHAR)
SELECT SUM(grid) FROM table_name_46 WHERE rider = "shinichi nakatomi"
What location is Jimmy Smith fighting in?
CREATE TABLE table_57562 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text,"Time" text,"Location" text)
SELECT "Location" FROM table_57562 WHERE "Opponent" = 'jimmy smith'
which was k. annamalai s party a?
CREATE TABLE table_22757733_4 (party VARCHAR,runner_up_a VARCHAR)
SELECT party AS a FROM table_22757733_4 WHERE runner_up_a = "K. Annamalai"
How many episodes of 30 minutes were written by John Sullivan?
CREATE TABLE table_21854 ("Episode" real,"Original title" text,"Directed by" text,"Written by" text,"Original airdate" text,"Duration" text,"Viewership" text)
SELECT COUNT("Duration") FROM table_21854 WHERE "Written by" = 'John Sullivan'
Who was featured in 20 questions on 4-03?
CREATE TABLE table_20226 ("Date" text,"Cover model" text,"Centerfold model" text,"Interview subject" text,"20 Questions" text,"Pictorials" text)
SELECT "20 Questions" FROM table_20226 WHERE "Date" = '4-03'
What is the total number for Seve Ballesteros?
CREATE TABLE table_name_24 (total VARCHAR,player VARCHAR)
SELECT COUNT(total) FROM table_name_24 WHERE player = "seve ballesteros"
What is the lowest student GPA for every department? Return a bar chart, show in asc by the y axis.
CREATE TABLE ENROLL (CLASS_CODE varchar(5),STU_NUM int,ENROLL_GRADE varchar(50))CREATE TABLE CLASS (CLASS_CODE varchar(5),CRS_CODE varchar(10),CLASS_SECTION varchar(2),CLASS_TIME varchar(20),CLASS_ROOM varchar(8),PROF_NUM int)CREATE TABLE STUDENT (STU_NUM int,STU_LNAME varchar(15),STU_FNAME varchar(15),STU_INIT varchar...
SELECT DEPT_CODE, MIN(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY MIN(STU_GPA)
How many vehicle thefts data were recorded if forcible rape is 1232?
CREATE TABLE table_26060884_2 (vehicle_theft VARCHAR,forcible_rape VARCHAR)
SELECT COUNT(vehicle_theft) FROM table_26060884_2 WHERE forcible_rape = 1232
what is the s.r. number when lb&sc number is 34?
CREATE TABLE table_name_91 (sr_number VARCHAR,lb VARCHAR,sc_number VARCHAR)
SELECT sr_number FROM table_name_91 WHERE lb & sc_number = 34
What is High Assists, when Date is 'March 10'?
CREATE TABLE table_name_93 (high_assists VARCHAR,date VARCHAR)
SELECT high_assists FROM table_name_93 WHERE date = "march 10"
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of manager_id over the hire_date bin hire_date by time by a bar chart.
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE ...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
so, what was the last systemicdiastolic of patient 022-187132 on the current icu visit?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE intakeoutput (intakeoutputid number,patientunits...
SELECT vitalperiodic.systemicdiastolic FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-187132') AND patient.unitdischargetime IS NUL...
Which label's year is 1993?
CREATE TABLE table_name_45 (label VARCHAR,year VARCHAR)
SELECT label FROM table_name_45 WHERE year = "1993"
What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?
CREATE TABLE station (name VARCHAR,id VARCHAR)CREATE TABLE status (station_id VARCHAR,bikes_available INTEGER)
SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date LIKE "12/%"
A stacked bar chart showing the number of engineers for different skill description The x-axis is skill description and group by other deteails, I want to show y axis from low to high order.
CREATE TABLE Maintenance_Contracts (maintenance_contract_id INTEGER,maintenance_contract_company_id INTEGER,contract_start_date DATETIME,contract_end_date DATETIME,other_contract_details VARCHAR(255))CREATE TABLE Maintenance_Engineers (engineer_id INTEGER,company_id INTEGER,first_name VARCHAR(50),last_name VARCHAR(50),...
SELECT skill_description, COUNT(skill_description) FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY other_details, skill_description ORDER BY COUNT(skill_description)
What is the total swimsuit with Preliminaries smaller than 8.27?
CREATE TABLE table_69210 ("State" text,"Preliminaries" real,"Interview" real,"Swimsuit" real,"Evening Gown" real,"Average" real)
SELECT SUM("Swimsuit") FROM table_69210 WHERE "Preliminaries" < '8.27'
give me a good french restaurant in the yosemite and mono lake area ?
CREATE TABLE location (restaurant_id int,house_number int,street_name varchar,city_name varchar)CREATE TABLE restaurant (id int,name varchar,food_type varchar,city_name varchar,rating "decimal)CREATE TABLE geographic (city_name varchar,county varchar,region varchar)
SELECT location.house_number, restaurant.name FROM geographic, location, restaurant WHERE geographic.region = 'yosemite and mono lake area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'french' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
what is kannada name of tamil name anusham
CREATE TABLE table_201400_2 (kannada_name_ಕನ್ನಡ VARCHAR,tamil_name_தமிழ் VARCHAR)
SELECT kannada_name_ಕನ್ನಡ FROM table_201400_2 WHERE tamil_name_தமிழ் = "Anusham அனுஷம்"
What is the series number when al horford (10) had the high rebounds?
CREATE TABLE table_27734577_13 (series VARCHAR,high_rebounds VARCHAR)
SELECT series FROM table_27734577_13 WHERE high_rebounds = "Al Horford (10)"
Which Score has a To par of +1 in sweden?
CREATE TABLE table_name_67 (score VARCHAR,to_par VARCHAR,country VARCHAR)
SELECT score FROM table_name_67 WHERE to_par = "+1" AND country = "sweden"
did patient 033-4763 receive a anticonvulsants - valproate operation in another hospital during this year?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text...
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '033-4763' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '033-4763' AND patient.hospitaldischargetime IS NULL)) AND trea...
What is the total associated with a Clean & jerk of 135, and a Snatch of 115?
CREATE TABLE table_56018 ("Name" text,"Bodyweight" real,"Snatch" real,"Clean & jerk" real,"Total (kg)" real)
SELECT "Total (kg)" FROM table_56018 WHERE "Clean & jerk" = '135' AND "Snatch" = '115'
how many venues were played on in round 1
CREATE TABLE table_24212 ("Competition" text,"Round" text,"Opponent" text,"Result" text,"Score" text,"Home/Away" text,"Venue" text,"Attendance" real,"Date" text)
SELECT COUNT("Venue") FROM table_24212 WHERE "Round" = '1'
How many people attended the game on September 19, 1976?
CREATE TABLE table_75576 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Venue" text,"Attendance" real)
SELECT COUNT("Attendance") FROM table_75576 WHERE "Date" = 'september 19, 1976'
Who was the home team on 4 February 1987 when Luton Town was away team and there was no replay?
CREATE TABLE table_name_68 (home_team VARCHAR,away_team VARCHAR,tie_no VARCHAR,date VARCHAR)
SELECT home_team FROM table_name_68 WHERE tie_no = "replay" AND date = "4 february 1987" AND away_team = "luton town"
what is the number of patients born before the year 2152 and with drug route pb?
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.dob_year < "2152" AND prescriptions.route = "PB"
What was the Record of the game with a Score of 118 105?
CREATE TABLE table_34085 ("Date" text,"Opponent" text,"Result" text,"Score" text,"Record" text,"Streak" text)
SELECT "Record" FROM table_34085 WHERE "Score" = '118–105'
Who was from Great Britain in lanes under number 3?
CREATE TABLE table_name_1 (name VARCHAR,lane VARCHAR,nationality VARCHAR)
SELECT name FROM table_name_1 WHERE lane < 3 AND nationality = "great britain"
What rank is the common with an area of 47.3 km^2?
CREATE TABLE table_1449176_1 (rank VARCHAR,area__km_2__ VARCHAR)
SELECT rank FROM table_1449176_1 WHERE area__km_2__ = "47.3"
On Mondays and Wednesdays , can I take 398 ?
CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE student_record (student_id int,course_id int,semester in...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'Y' AND course_offering.thursday = 'N' AND course_offering.tuesday = 'N' AND course_offering.wednesday = 'Y' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND cour...
How many picks went to College of Letran?
CREATE TABLE table_name_95 (pick VARCHAR,college VARCHAR)
SELECT COUNT(pick) FROM table_name_95 WHERE college = "letran"
Find times of trains that run through stations for the local authority Chiltern, compare the total number of different times, I want to rank by the X from high to low.
CREATE TABLE station (id int,network_name text,services text,local_authority text)CREATE TABLE route (train_id int,station_id int)CREATE TABLE train (id int,train_number int,name text,origin text,destination text,time text,interval text)CREATE TABLE weekly_weather (station_id int,day_of_week text,high_temperature int,l...
SELECT time, COUNT(time) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY time ORDER BY time DESC
What is the s7 4.0 tfsi quattro engine torque?
CREATE TABLE table_24183 ("Model" text,"Years" text,"Type/code" text,"Transmission" text,"max. power" text,"Torque" text,"0-km/h (mph) (sec)" text,"top speed" text)
SELECT "Torque" FROM table_24183 WHERE "Model" = 'S7 4.0 TFSI quattro'
Visualize a bar chart about the distribution of Sex and the sum of Height , and group by attribute Sex, show in ascending by the bars.
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, SUM(Height) FROM people GROUP BY Sex ORDER BY Sex
In what year was Martin Sheen nominated?
CREATE TABLE table_name_3 (year VARCHAR,nominee VARCHAR)
SELECT year FROM table_name_3 WHERE nominee = "martin sheen"
Who is the rider with less than 15 laps, more than 32 grids, and an accident time/retired?
CREATE TABLE table_77255 ("Rider" text,"Manufacturer" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT "Rider" FROM table_77255 WHERE "Laps" < '15' AND "Grid" > '32' AND "Time/Retired" = 'accident'
With 0 Goals and less than 1 Tries, what is Matt James position?
CREATE TABLE table_71193 ("Player" text,"Position" text,"Previous Club" text,"Apps" real,"Tries" real,"Goals" text,"Points" real)
SELECT "Position" FROM table_71193 WHERE "Goals" = '0' AND "Tries" < '1' AND "Player" = 'matt james'
what is the three most common procedure given to patients aged 50s until 2104?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunit...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND STRFTIME('%y', treatment.treatmenttime) <= '2104' GROUP BY treatment....
My most insufficient-rep voted posts.
CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags tex...
SELECT Id AS "post_link", Score, (SELECT COUNT(Id) FROM PostFeedback AS v WHERE p.Id = v.PostId AND v.VoteTypeId = 2) AS Upmods, (SELECT COUNT(Id) FROM PostFeedback AS v WHERE p.Id = v.PostId AND v.VoteTypeId = 3) AS Downmods FROM Posts AS p WHERE p.OwnerUserId = '##UserId##' ORDER BY (SELECT COUNT(Id) FROM PostFeedbac...
What class has over 0 wins and 42 points?
CREATE TABLE table_name_13 (class VARCHAR,wins VARCHAR,points VARCHAR)
SELECT class FROM table_name_13 WHERE wins > 0 AND points = 42
Count the Number of Questions with No Answer Post.
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...
SELECT COUNT(Id) AS "Number of Questions WITH No Answer Post" FROM Posts WHERE AnswerCount = 0
Which date has a Stage of 12?
CREATE TABLE table_71069 ("Stage" text,"Date" text,"Course" text,"Distance" text,"Winner" text,"Race Leader" text)
SELECT "Date" FROM table_71069 WHERE "Stage" = '12'
For players with fewer than 41 goals for CA Osasuna and averages under 1.06, what is the average number of matches?
CREATE TABLE table_name_5 (matches INTEGER,average VARCHAR,goals VARCHAR,team VARCHAR)
SELECT AVG(matches) FROM table_name_5 WHERE goals < 41 AND team = "ca osasuna" AND average < 1.06
What year was holly hunter a nominee?
CREATE TABLE table_65857 ("Year (Ceremony)" text,"Actor/Actress" text,"Category" text,"Film title used in nomination" text,"Result" text)
SELECT "Year (Ceremony)" FROM table_65857 WHERE "Result" = 'nominee' AND "Actor/Actress" = 'holly hunter'
when did the first test of patient 72364 happen since 07/2105?
CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)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)C...
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 72364) AND STRFTIME('%y-%m', labevents.charttime) >= '2105-07' ORDER BY labevents.charttime LIMIT 1
until 4 years ago, when did patient 035-17122 receive a procedure for the first time?
CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid nu...
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-17122')) AND DATETIME(treatment.treatmenttime) <= DATETIME(CU...
How many body builders are there?
CREATE TABLE body_builder (body_builder_id number,people_id number,snatch number,clean_jerk number,total number)CREATE TABLE people (people_id number,name text,height number,weight number,birth_date text,birth_place text)
SELECT COUNT(*) FROM body_builder
How many bronze had a total less than 4 and gold bigger than 1?
CREATE TABLE table_name_43 (bronze VARCHAR,total VARCHAR,gold VARCHAR)
SELECT COUNT(bronze) FROM table_name_43 WHERE total < 4 AND gold > 1
What was the Money ($) amount for Cary Middlecoff?
CREATE TABLE table_71031 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real)
SELECT "Money ( $ )" FROM table_71031 WHERE "Player" = 'cary middlecoff'
Who is the female talent in 1999?
CREATE TABLE table_name_41 (talent__female_ VARCHAR,year VARCHAR)
SELECT talent__female_ FROM table_name_41 WHERE year = 1999
How many fatalities occurred for the Ju-52 aircraft?
CREATE TABLE table_name_18 (fatalities VARCHAR,aircraft VARCHAR)
SELECT fatalities FROM table_name_18 WHERE aircraft = "ju-52"
Which type of locomotive was built in 1923?
CREATE TABLE table_name_46 (type VARCHAR,built VARCHAR)
SELECT type FROM table_name_46 WHERE built = 1923
During November 3 where august 21-22 is august 21, 2017?
CREATE TABLE table_25287007_2 (november_3 VARCHAR,august_21_22 VARCHAR)
SELECT november_3 FROM table_25287007_2 WHERE august_21_22 = "August 21, 2017"
which year -lrb- s -rrb- received the lowest rank in the ratings ?
CREATE TABLE table_202_135 (id number,"series" number,"year" text,"rank" text,"average audience share" text)
SELECT "year" FROM table_202_135 ORDER BY "rank" DESC LIMIT 1
What was the airdate of the episode that was directed by giancarlo volpe and written by is john o'bryan?
CREATE TABLE table_19394 ("No. in series" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real)
SELECT "Original air date" FROM table_19394 WHERE "Directed by" = 'Giancarlo Volpe' AND "Written by" = 'John O''Bryan'
Which Object type has a Constellation of cancer?
CREATE TABLE table_52287 ("NGC number" real,"Object type" text,"Constellation" text,"Right ascension (J2000)" text,"Declination (J2000)" text)
SELECT "Object type" FROM table_52287 WHERE "Constellation" = 'cancer'
what is the value for minimum total wins
CREATE TABLE table_19405 ("Nation" text,"Total wins" real,"Team wins" real,"Individual wins" real,"Individual winners" real)
SELECT MIN("Total wins") FROM table_19405
Favorite questions asked since 1 Jan 2013.
CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,Appr...
SELECT Id AS "post_link", CreationDate, FavoriteCount FROM Posts WHERE PostTypeId = 1 AND TIME_TO_STR(CreationDate, '%Y') >= 2013 AND FavoriteCount >= 25 ORDER BY CreationDate DESC
What categories had a Nominated work of yerma before 1992?
CREATE TABLE table_name_99 (category VARCHAR,year VARCHAR,nominated_work VARCHAR)
SELECT category FROM table_name_99 WHERE year < 1992 AND nominated_work = "yerma"
Who directed the episode whose production code is 2m5901?
CREATE TABLE table_27969432_4 (directed_by VARCHAR,production VARCHAR)
SELECT directed_by FROM table_27969432_4 WHERE production = "2M5901"
List document type codes and the number of documents in each code Visualize by bar chart, and rank by the Document_Type_Code in ascending please.
CREATE TABLE Statements (Statement_ID INTEGER,Statement_Details VARCHAR(255))CREATE TABLE Accounts (Account_ID INTEGER,Statement_ID INTEGER,Account_Details VARCHAR(255))CREATE TABLE Documents_with_Expenses (Document_ID INTEGER,Budget_Type_Code CHAR(15),Document_Details VARCHAR(255))CREATE TABLE Ref_Document_Types (Docu...
SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY Document_Type_Code
With the Ground of Humber College North at 12:00, what was the Away?
CREATE TABLE table_name_69 (away VARCHAR,ground VARCHAR,time VARCHAR)
SELECT away FROM table_name_69 WHERE ground = "humber college north" AND time = "12:00"
In the Western Oval venue, what is the average crowd?
CREATE TABLE table_name_38 (crowd INTEGER,venue VARCHAR)
SELECT AVG(crowd) FROM table_name_38 WHERE venue = "western oval"
What is the money list rank when the starts are less than 30, earnings are larger than 8,689, and the ranking is 2 in the top 25?
CREATE TABLE table_41650 ("Year" text,"Starts" real,"Cuts Made" real,"Wins" real,"Top 10" real,"Top 25" real,"Earnings (\u20ac)" real,"Money list rank" text)
SELECT "Money list rank" FROM table_41650 WHERE "Starts" < '30' AND "Earnings (\u20ac)" > '8,689' AND "Top 25" = '2'
What is the lowest Population (1 July 2005 est.), when Population density (per km ) is 0?
CREATE TABLE table_41613 ("Name" text,"Subdivisions" text,"Area (km\u00b2)" real,"Population (1 July 2005 est.)" real,"Population density (per km\u00b2)" real,"Capital" text)
SELECT MIN("Population (1 July 2005 est.)") FROM table_41613 WHERE "Population density (per km\u00b2)" = '0'
What was the highest pick for Penn State?
CREATE TABLE table_name_57 (pick__number INTEGER,college VARCHAR)
SELECT MAX(pick__number) FROM table_name_57 WHERE college = "penn state"
Which committees have delegates from the Democratic party, and count them by a bar chart, and display from high to low by the total number.
CREATE TABLE county (County_Id int,County_name text,Population real,Zip_code text)CREATE TABLE party (Party_ID int,Year real,Party text,Governor text,Lieutenant_Governor text,Comptroller text,Attorney_General text,US_Senate text)CREATE TABLE election (Election_ID int,Counties_Represented text,District int,Delegate text...
SELECT Committee, COUNT(Committee) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic" GROUP BY Committee ORDER BY COUNT(Committee) DESC
what is the number of stars italy has ?
CREATE TABLE table_204_543 (id number,"national team" text,"title(s)\nrepresented" text,"first\nworn" number,"number\nof stars" number,"notes" text)
SELECT "number\nof stars" FROM table_204_543 WHERE "national team" = 'italy'
For the game with team of @ Chicago, what was the final score?
CREATE TABLE table_51022 ("Game" real,"Date" text,"Team" text,"Score" text,"Location Attendance" text,"Record" text)
SELECT "Score" FROM table_51022 WHERE "Team" = '@ chicago'
What team has 2000-01 as the season?
CREATE TABLE table_75492 ("Record" text,"Team" text,"Season" text,"League" text,"Number" real)
SELECT "Team" FROM table_75492 WHERE "Season" = '2000-01'
Give the primary disease and admission time of Jennifer Fulgham.
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 demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Jennifer Fulgham"
What is the player from Australia's rank with more than 16 wins?
CREATE TABLE table_name_63 (rank VARCHAR,wins VARCHAR,country VARCHAR)
SELECT COUNT(rank) FROM table_name_63 WHERE wins > 16 AND country = "australia"
What was the score in Volkswagen Challenger tournament?
CREATE TABLE table_67329 ("Outcome" text,"Tournament" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text)
SELECT "Score" FROM table_67329 WHERE "Tournament" = 'volkswagen challenger'
When was the attendance 65,806?
CREATE TABLE table_name_40 (date VARCHAR,attendance VARCHAR)
SELECT date FROM table_name_40 WHERE attendance = "65,806"
AWL #1 Example Sentence Expert.
CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount num...
SELECT * FROM Posts WHERE (Id LIKE 23569441)
When has winnipeg jets with a Score of 4 6?
CREATE TABLE table_70438 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text)
SELECT "Date" FROM table_70438 WHERE "Home" = 'winnipeg jets' AND "Score" = '4–6'
what was patient 010-16627's monthly minimum value of body weight until 30 months ago?
CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid...
SELECT MIN(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-16627') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-30 month') GROUP BY STRFTIME...
Which Points have a Score of 4 1, and a Game smaller than 39?
CREATE TABLE table_name_91 (points INTEGER,score VARCHAR,game VARCHAR)
SELECT SUM(points) FROM table_name_91 WHERE score = "4–1" AND game < 39
what is the title where the airdate is december 5, 1964?
CREATE TABLE table_25800134_9 (title VARCHAR,airdate VARCHAR)
SELECT title FROM table_25800134_9 WHERE airdate = "December 5, 1964"
what is the total amount of input that patient 002-34744 received on 05/05/last year.
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunits...
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-34744')) AND intakeoutput.cellpath LIKE '%in...
What is the name of the customer that made the order with the largest quantity?
CREATE TABLE customers (customer_name VARCHAR,customer_id VARCHAR)CREATE TABLE order_items (order_id VARCHAR,order_quantity INTEGER)CREATE TABLE customer_orders (customer_id VARCHAR,order_id VARCHAR)
SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items)