table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE table_14816 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
What was the finish with less than 200 laps in 1953?
SELECT "Finish" FROM table_14816 WHERE "Laps" < '200' AND "Year" = '1953'
CREATE TABLE table_7187 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
What is the Result with a Venue that is n?
SELECT "Result" FROM table_7187 WHERE "Venue" = 'n'
CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE writes ( paperid int, ...
how many papers are in emnlp ?
SELECT DISTINCT COUNT(paper.paperid) FROM paper, venue WHERE venue.venueid = paper.venueid AND venue.venuename = 'emnlp'
CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) CREATE TABLE gas_station ( Station_ID int, Open_Year int, Location text, Manager_Name text, Vice_Manager_Name text, Representative_Name text ) CREATE TABLE company ( Company_ID int, Rank i...
How many companies that are not headquartered in the United States for each main industry? Show me a bar chart, and could you display by the total number from high to low?
SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE Headquarters <> 'USA' GROUP BY Main_Industry ORDER BY COUNT(Main_Industry) DESC
CREATE TABLE table_name_33 ( tournament VARCHAR, partner VARCHAR, opponent_in_the_final VARCHAR )
What Tournament did Silva Partner with Nicole Thijssen with Opponent in the final Nina Bratchikova & Frederica Piedade?
SELECT tournament FROM table_name_33 WHERE partner = "nicole thijssen" AND opponent_in_the_final = "nina bratchikova & frederica piedade"
CREATE TABLE table_name_72 ( goals_conceded INTEGER, played INTEGER )
If the games played are smaller than 18, what are the lowest goals conceded?
SELECT MIN(goals_conceded) FROM table_name_72 WHERE played < 18
CREATE TABLE table_name_91 ( total VARCHAR, gold VARCHAR )
What is the total medal count for the nation that has 5 gold?
SELECT total FROM table_name_91 WHERE gold = "5"
CREATE TABLE table_59964 ( "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text, "Week 6" text, "Week 7" text, "Week 8" text, "Week 9" text, "Week 10 FINAL" text )
What kind of Week 1 has a Week 8 of not eligible, and a Week 9 of no nominations, and a Week 3 of cyril? Question 3
SELECT "Week 1" FROM table_59964 WHERE "Week 8" = 'not eligible' AND "Week 9" = 'no nominations' AND "Week 3" = 'cyril'
CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Scientists ( SSN int, Name Char(30) )
What are the naems of all the projects, and how many scientists were assigned to each of them.
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name
CREATE TABLE table_24575 ( "Train No." text, "Train Name" text, "Destination" text, "Category" text, "Frequency" text )
How many destinations have a weekly frequency and are named AC Express?
SELECT COUNT("Destination") FROM table_24575 WHERE "Frequency" = 'Weekly' AND "Train Name" = 'AC Express'
CREATE TABLE table_74799 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which team plays home at Princes Park?
SELECT "Home team" FROM table_74799 WHERE "Venue" = 'princes park'
CREATE TABLE table_49511 ( "Position" real, "Name" text, "Played" real, "Drawn" real, "Lost" real, "Points" real )
What was the average losses for team with points larger than 3 and played larger thna 14?
SELECT AVG("Lost") FROM table_49511 WHERE "Points" > '3' AND "Played" > '14'
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE airport ( airport_code varchar, ...
show me the flights from DENVER to PHILADELPHIA again
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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADE...
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 )
Bar chart of minimal price from each name
SELECT Name, MIN(Price) FROM Products GROUP BY Name
CREATE TABLE table_name_23 ( to_par INTEGER, country VARCHAR, year_s__won VARCHAR )
What is the sum of To Par, when Country is 'United States', and when Year(s) Won is '1973'?
SELECT SUM(to_par) FROM table_name_23 WHERE country = "united states" AND year_s__won = "1973"
CREATE TABLE table_5195 ( "Name" text, "Team" text, "Qual 1" text, "Qual 2" text, "Best" text )
What was the qualifying 2 time for the team with a qualifying 1 time of 1:01.630?
SELECT "Qual 2" FROM table_5195 WHERE "Qual 1" = '1:01.630'
CREATE TABLE table_21059 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter" text, "Year named" real, "Namesake" text )
How many longitudes have a diameter of 224.0?
SELECT COUNT("Longitude") FROM table_21059 WHERE "Diameter" = '224.0'
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime ...
when was the first time that patient 31696 has been prescribed medication via td route in 07/last year?
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31696) AND prescriptions.route = 'td' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m',...
CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) ...
Emacs questions across Stack Exchange, per month. Number of questions posted each month about Emacs across Stack Exchange. All questions from Emacs Stack Exchange are included, as well as questions tagged [emacs*], [elisp] or [org-mode] on other sites.
SELECT so.month AS "month", emacs.count AS "emacs", so.count AS "so" FROM (SELECT CAST(YEAR(p.CreationDate) AS TEXT(4)) + '-' + CAST(MONTH(p.CreationDate) AS TEXT(2)) AS "month", COUNT(*) AS "count" FROM "stackexchange.emacs".dbo.Posts AS p GROUP BY YEAR(p.CreationDate), MONTH(p.CreationDate)) AS emacs JOIN (SELECT CAS...
CREATE TABLE table_8021 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Who was the away team when bournemouth was the home team?
SELECT "Away team" FROM table_8021 WHERE "Home team" = 'bournemouth'
CREATE TABLE table_1840495_2 ( number_of_households VARCHAR, per_capita_income VARCHAR )
With a per capita income of $30,298, what was the total number of households?
SELECT COUNT(number_of_households) FROM table_1840495_2 WHERE per_capita_income = "$30,298"
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
count the number of patients whose admission year is less than 2198 and diagnoses short title is aftrcre traum fx low leg?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2198" AND diagnoses.short_title = "Aftrcre traum fx low leg"
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, m...
of the flights available from DALLAS to BALTIMORE on 8 3 which airline has the least expensive flight
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, fare, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 3 A...
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,...
is joseph dillman single, married, or widowed?
SELECT demographic.marital_status FROM demographic WHERE demographic.name = "Joseph Dillman"
CREATE TABLE Document_Locations ( Document_ID INTEGER, Location_Code CHAR(15), Date_in_Location_From DATETIME, Date_in_Locaton_To DATETIME ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE...
Show all calendar dates and day Numbers in a line chart, sort in desc by the x axis.
SELECT Calendar_Date, Day_Number FROM Ref_Calendar ORDER BY Calendar_Date DESC
CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Birth_Date text, Birth_Place text ) CREATE TABLE body_builder ( Body_Builder_ID int, People_ID int, Snatch real, Clean_Jerk real, Total real )
Visualize a scatter chart about the correlation between Clean_Jerk and Total .
SELECT Clean_Jerk, Total FROM body_builder
CREATE TABLE table_204_147 ( id number, "#" number, "date" text, "opponent" text, "score" text, "win" text, "loss" text, "save" text, "attendance" number, "record" text )
how many games had an attendance of more than 30,000 ?
SELECT COUNT(*) FROM table_204_147 WHERE "attendance" > 30000
CREATE TABLE table_49940 ( "Player" text, "Team" text, "Matches" real, "Wickets" real, "Average" real, "Best Bowling" text )
What is the total average for the England team when the wickets are less than 18, the best bowling is 4/138, and there are less than 3 matches?
SELECT COUNT("Average") FROM table_49940 WHERE "Team" = 'england' AND "Wickets" < '18' AND "Best Bowling" = '4/138' AND "Matches" < '3'
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Des...
Do Questions Get Answers on Math.StackExchange?.
SELECT q1."# ans", q1."ct" AS "#q", q2."ct" AS "#q score>5" FROM (SELECT Posts.AnswerCount AS "# ans", COUNT(*) AS "ct" FROM Posts WHERE Posts.AnswerCount >= -1 AND Posts.AnswerCount < 10 AND Posts.Score > 0 GROUP BY Posts.AnswerCount) AS q1 INNER JOIN (SELECT Posts.AnswerCount AS "# ans", COUNT(*) AS "ct" FROM Posts W...
CREATE TABLE Payments ( Payment_ID INTEGER, Settlement_ID INTEGER, Payment_Method_Code VARCHAR(255), Date_Payment_Made DATE, Amount_Payment INTEGER ) CREATE TABLE Claims ( Claim_ID INTEGER, Policy_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INTEGER,...
Return the number of the claim start date for the claims whose claimed amount is no more than the average, could you show by the Y-axis in ascending?
SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made)
CREATE TABLE table_name_38 ( date VARCHAR, set_3 VARCHAR, score VARCHAR, time VARCHAR )
Which Date has a Score of 2 3, a Time of 20:30, and a Set 3 of 16 25?
SELECT date FROM table_name_38 WHERE score = "2–3" AND time = "20:30" AND set_3 = "16–25"
CREATE TABLE table_name_49 ( film_title_used_in_nomination VARCHAR, serbian_title VARCHAR )
What is the Film title used in nomination of the Film with a Serbian title of ?
SELECT film_title_used_in_nomination FROM table_name_49 WHERE serbian_title = "бело одело"
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
Return a bar chart about the distribution of All_Road and School_ID , could you list by the names in asc please?
SELECT All_Road, School_ID FROM basketball_match ORDER BY All_Road
CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number 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 Dorm_amenity ( ameni...
Find the number of students for the cities where have more than one student, and sort by the X-axis from high to low.
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY city_code DESC
CREATE TABLE table_name_85 ( website VARCHAR, frequency VARCHAR, callsign VARCHAR )
Which Website has a Frequency smaller than 760 and a Callsign of kkyx?
SELECT website FROM table_name_85 WHERE frequency < 760 AND callsign = "kkyx"
CREATE TABLE table_6567 ( "Rank" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the average number of bronze medals of the team with 0 silvers, ranked 3, and less than 1 total medal?
SELECT AVG("Bronze") FROM table_6567 WHERE "Silver" = '0' AND "Rank" = '3' AND "Total" < '1'
CREATE TABLE table_29612 ( "Game" real, "October" real, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text, "Points" real )
Name the score for game 5
SELECT "Score" FROM table_29612 WHERE "Game" = '5'
CREATE TABLE table_68450 ( "Need" text, "Being (qualities)" text, "Having (things)" text, "Doing (actions)" text, "Interacting (settings)" text )
Name the being qualities for having things of friendships, family, relationships with nature
SELECT "Being (qualities)" FROM table_68450 WHERE "Having (things)" = 'friendships, family, relationships with nature'
CREATE TABLE people ( people_id number, name text, height number, weight number, date_of_birth text ) CREATE TABLE entrepreneur ( entrepreneur_id number, people_id number, company text, money_requested number, investor text )
What are the weights of entrepreneurs in descending order of money requested?
SELECT T2.weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id ORDER BY T1.money_requested DESC
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, d...
among patients who were prescribed with atropine 0.1 mg/ml syringe : 10 ml syringe, what is the three most frequently prescribed drug at the same time, until 1 year ago?
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'atropine 0.1 mg/ml syringe : 10 ml syringe' AND DAT...
CREATE TABLE table_name_94 ( opponent VARCHAR, game VARCHAR )
Who was the opponent in Game 27?
SELECT opponent FROM table_name_94 WHERE game = 27
CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15), Workshop_Group_ID INTEGER, Product_Description VARCHAR(255), Product_Name VARCHAR(255), Product_Price DECIMAL(20,4), Other_Product_Service_Details VARCHAR(255) ) CREATE TABLE Order_Items ( Order_Item_ID INTEGER, ...
Show all payment method codes and the number of orders for each code Show bar chart, order from high to low by the Y.
SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code ORDER BY COUNT(*) DESC
CREATE TABLE table_77069 ( "Name of System" text, "Location" text, "Traction Type" text, "Date (From)" text, "Date (To)" text )
What is the date (to) associated wiht a traction type of electric and the Yarmouth Light and Power Company system?
SELECT "Date (To)" FROM table_77069 WHERE "Traction Type" = 'electric' AND "Name of System" = 'yarmouth light and power company'
CREATE TABLE table_19282 ( "Series" text, "Main presenter" text, "Co-presenter" text, "Comedian" text, "UK co-presenter" text )
Who are the UK co-presenters that have Joe Swash as a co-presenter and Russell Kane as a comedian?
SELECT COUNT("UK co-presenter") FROM table_19282 WHERE "Co-presenter" = 'Joe Swash' AND "Comedian" = 'Russell Kane'
CREATE TABLE table_74012 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text )
Name the candidates for john boyle
SELECT "Candidates" FROM table_74012 WHERE "Incumbent" = 'John Boyle'
CREATE TABLE table_63666 ( "Restaurant Name" text, "Original Name" text, "Location" text, "Chef" text, "Designer" text, "Still Open?" text )
is the restaurant locavore still open?
SELECT "Still Open?" FROM table_63666 WHERE "Restaurant Name" = 'locavore'
CREATE TABLE table_name_95 ( finish VARCHAR, year VARCHAR )
What was Jack McGrath's finish number in 1954?
SELECT finish FROM table_name_95 WHERE year = "1954"
CREATE TABLE table_name_50 ( constructor VARCHAR, driver VARCHAR )
What is the constructor of the driver Heinz-Harald Frentzen?
SELECT constructor FROM table_name_50 WHERE driver = "heinz-harald frentzen"
CREATE TABLE table_train_38 ( "id" int, "left_ventricular_ejection_fraction_lvef" int, "child_pugh_class" string, "systolic_blood_pressure_sbp" int, "heart_disease" bool, "acute_hepatitis" bool, "liver_disease" bool, "heart_rate" int, "NOUSE" float )
left ventricular ejection fraction less than 30 %
SELECT * FROM table_train_38 WHERE left_ventricular_ejection_fraction_lvef < 30
CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID INTEGER, Statement_ID INTEGER, Account_Details VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255),...
Show the average of account details for different statement details in a bar chart, and order by the Y in ascending.
SELECT Statement_Details, AVG(Account_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY AVG(Account_Details)
CREATE TABLE table_name_68 ( method VARCHAR, opponent VARCHAR )
Which method had Travis Fulton as an opponent?
SELECT method FROM table_name_68 WHERE opponent = "travis fulton"
CREATE TABLE table_name_43 ( floors VARCHAR, location VARCHAR )
How many floors did the tallest building in Aston have?
SELECT floors FROM table_name_43 WHERE location = "aston"
CREATE TABLE order_items ( order_id number, product_id number, order_quantity text ) CREATE TABLE customer_addresses ( customer_id number, address_id number, date_address_from time, address_type text, date_address_to time ) CREATE TABLE products ( product_id number, product_det...
List all the distinct cities
SELECT DISTINCT city FROM addresses
CREATE TABLE wrestler ( wrestler_id number, name text, reign text, days_held text, location text, event text ) CREATE TABLE elimination ( elimination_id text, wrestler_id text, team text, eliminated_by text, elimination_move text, time text )
What is the name of the wrestler with the fewest days held?
SELECT name FROM wrestler ORDER BY days_held LIMIT 1
CREATE TABLE table_name_43 ( semi_finalists VARCHAR, week_of VARCHAR, runner_up VARCHAR )
Who are the semi finalists on the week of 12 june, when the runner-up is listed as Lori McNeil?
SELECT semi_finalists FROM table_name_43 WHERE week_of = "12 june" AND runner_up = "lori mcneil"
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
among patients who remained admitted in hospital for more than 10 days, how many of them got drug administered in both eyes?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "10" AND prescriptions.route = "BOTH EYES"
CREATE TABLE table_13598 ( "Year" real, "Title" text, "Singapore 987FM Top Position" text, "Singapore Power98 Top Position" text, "Album" text )
What is the average year for Faces?
SELECT AVG("Year") FROM table_13598 WHERE "Title" = 'faces'
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Show me about the distribution of All_Neutral and All_Games_Percent in a bar chart, I want to display by the total number in ascending.
SELECT All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent
CREATE TABLE table_name_25 ( home_captain VARCHAR, result VARCHAR )
Who was the Home Captain and the Result for AUS by 4 wkts?
SELECT home_captain FROM table_name_25 WHERE result = "aus by 4 wkts"
CREATE TABLE table_29634 ( "#" real, "Title" text, "Directed by" text, "Written by" text, "Viewers" real, "Original airdate" text, "Prod. code" real )
What is the original air date of # 6?
SELECT "Original airdate" FROM table_29634 WHERE "#" = '6'
CREATE TABLE table_9378 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High assists" text, "Location Attendance" text, "Record" text )
How many games were on December 5?
SELECT SUM("Game") FROM table_9378 WHERE "Date" = 'december 5'
CREATE TABLE table_68340 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
what is the total number of rounds when method is tko (punches) and time is 0:40?
SELECT COUNT("Round") FROM table_68340 WHERE "Method" = 'tko (punches)' AND "Time" = '0:40'
CREATE TABLE table_27553 ( "Player" text, "Games Played" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real )
How many players 89 points?
SELECT COUNT("Blocks") FROM table_27553 WHERE "Points" = '89'
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
what is maximum age of patients whose insurance is self pay and primary disease is stemi?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Self Pay" AND demographic.diagnosis = "STEMI"
CREATE TABLE table_76393 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Language(s)" text, "Director" text, "Result" text )
What year was Zona Sur nominated?
SELECT "Year (Ceremony)" FROM table_76393 WHERE "Original title" = 'zona sur'
CREATE TABLE table_42209 ( "Record" text, "Athlete" text, "Nation" text, "Venue" text, "Date" text )
What is the Record with a Date that is may 20, 1961?
SELECT "Record" FROM table_42209 WHERE "Date" = 'may 20, 1961'
CREATE TABLE table_name_42 ( total INTEGER, gold VARCHAR, bronze VARCHAR )
What is the smallest total that has 11 golds and bronzes over 2?
SELECT MIN(total) FROM table_name_42 WHERE gold = 11 AND bronze > 2
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, ...
what is the minimum hospital cost that includes a procedure known as hormonal therapy (for varices) since 3 years ago?
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'hormonal therapy (for varices)')) AND DATETI...
CREATE TABLE table_name_56 ( points INTEGER, laps VARCHAR, grid VARCHAR, driver VARCHAR )
Which Points have a Grid larger than 7, and a Driver of alex tagliani, and a Lapse smaller than 85?
SELECT MAX(points) FROM table_name_56 WHERE grid > 7 AND driver = "alex tagliani" AND laps < 85
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, formulary_drug_cd text, ...
what is drug type and drug route of drug name diltiazem?
SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Diltiazem"
CREATE TABLE table_18753 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
what are all the record where date is january 21
SELECT "Record" FROM table_18753 WHERE "Date" = 'January 21'
CREATE TABLE table_61195 ( "Name" text, "Bodyweight" real, "Snatch" real, "Clean & Jerk" real, "Total (kg)" real )
WHAT IS THE SNATCH WITH TOTAL KG SMALLER THAN 318, AND CLEAN JERK LARGER THAN 175?
SELECT MIN("Snatch") FROM table_61195 WHERE "Total (kg)" < '318' AND "Clean & Jerk" > '175'
CREATE TABLE table_200_4 ( id number, "team" text, "p" number, "w" number, "t" number, "l" number, "gf" number, "ga" number, "gd" number, "pts." number )
how many points did portugal score in the 1994 europeans men 's handball championship preliminary round ?
SELECT "pts." FROM table_200_4 WHERE "team" = 'portugal'
CREATE TABLE allergy_type ( allergy text, allergytype text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE has_allergy ( stuid number, allergy text )
How many students have a food allergy?
SELECT COUNT(*) FROM has_allergy AS T1 JOIN allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "food"
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 lab ( labid numbe...
during the last year, what were the three most frequent drugs that were prescribed to patients during the same month after being diagnosed with s/p thoracoscopic procedure - pleurodesis?
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p thoracoscopic procedure - pleurodesis' AND DAT...
CREATE TABLE table_2896329_1 ( handicap VARCHAR, prize_money VARCHAR )
What was the handicap when the prize money was 120s?
SELECT handicap FROM table_2896329_1 WHERE prize_money = "120s"
CREATE TABLE table_61657 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" real )
How many weeks have an attendance less than 26,048?
SELECT SUM("Week") FROM table_61657 WHERE "Attendance" < '26,048'
CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME ) CREATE TABLE Student_Tests_Taken ( registration_id I...
How many courses for each subject? Plot a bar chart, I want to display by the y-axis in descending.
SELECT subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) DESC
CREATE TABLE table_name_71 ( studio_s_ VARCHAR, director VARCHAR )
What studio has the director Philip Frank Messina?
SELECT studio_s_ FROM table_name_71 WHERE director = "philip frank messina"
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, ...
how much was albuterol 0.083% neb soln first prescribed to patient 808 in 08/2105?
SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 808) AND prescriptions.drug = 'albuterol 0.083% neb soln' AND STRFTIME('%y-%m', prescriptions.startdate) = '2105-08' ORDER BY prescriptions.startdate LIMIT 1
CREATE TABLE table_name_78 ( record VARCHAR, year VARCHAR )
Name the record for 1997
SELECT record FROM table_name_78 WHERE year = "1997"
CREATE TABLE table_204_292 ( id number, "no." number, "name" text, "class" number, "games" number, "minutes" number, "points" number, "2 points\n(made/attempts)" text, "2 points\n(%)" number, "3 points\n(made/attempts)" text, "3 points\n(%)" number, "free throws\n(made/at...
who is the last player on the list to not attempt a 3 point shot ?
SELECT "name" FROM table_204_292 WHERE "3 points\n(made/attempts)" IS NULL ORDER BY id DESC LIMIT 1
CREATE TABLE table_40860 ( "Record" text, "Athlete" text, "Nation" text, "Venue" text, "Date" text )
What nation has a Record of 5.06m(16ft7in)?
SELECT "Nation" FROM table_40860 WHERE "Record" = '5.06m(16ft7in)'
CREATE TABLE table_26984 ( "Spacecraft" text, "Spacewalker" text, "Start \u2013 UTC" text, "End \u2013 UTC" text, "Duration" text, "Comments" text )
When first woman eva is the comment what is the end -utc?
SELECT "End \u2013 UTC" FROM table_26984 WHERE "Comments" = 'First woman EVA'
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 )
For those records from the products and each product's manufacturer, find name and code , and group by attribute name, and visualize them by a bar chart, and rank in desc by the bars.
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name DESC
CREATE TABLE table_38332 ( "Year" text, "Coach" text, "Crew" text, "Record" text, "Win %" real )
What is the total number of win % when John Gartin is coach, the crew is varsity 8+, and the year is 2005?
SELECT SUM("Win %") FROM table_38332 WHERE "Coach" = 'john gartin' AND "Crew" = 'varsity 8+' AND "Year" = '2005'
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 patient ( uniquepid text, ...
how much does a drug cost, lorazepam inj?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'lorazepam inj')
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
count the number of patients whose days of hospital stay is greater than 8 and procedure long title is other cystoscopy?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "8" AND procedures.long_title = "Other cystoscopy"
CREATE TABLE table_41391 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Kickoff Time" text, "Attendance" text )
What was the kickoff time for week 11's game?
SELECT "Kickoff Time" FROM table_41391 WHERE "Week" = '11'
CREATE TABLE table_16780 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text )
Who was the winning driver for the goodwood circuit?
SELECT "Winning driver" FROM table_16780 WHERE "Circuit" = 'Goodwood'
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description t...
tehran province of Iran Stackoverflow users.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%arak%' ORDER BY Reputation DESC
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, E...
Chance of getting an answer by user rep.
SELECT Reputation / 5 * 5, COUNT(CASE WHEN AnswerCount > 0 THEN 1 END) * 1.0 / COUNT(*) AS rate FROM Users, Posts WHERE Posts.PostTypeId = 1 AND OwnerUserId = Users.Id AND Reputation / 5 < '##maxReputation##' / 5 GROUP BY Reputation / 5 ORDER BY Reputation / 5
CREATE TABLE table_24900 ( "Code & location" text, "Missile Type" text, "Defense Area" text, "Dates" text, "Control Site condition/owner" text, "Launch Site condition/owner" text )
What is every missile type with a code and location of M-20 Harbor Drive?
SELECT "Missile Type" FROM table_24900 WHERE "Code & location" = 'M-20 Harbor Drive'
CREATE TABLE table_72556 ( "Rank" text, "Common" text, "Population" real, "Area (km 2 )" text, "Density (inhabitants/km 2 )" text, "Altitude (mslm)" real )
Where does the common of Galliate rank in population?
SELECT "Rank" FROM table_72556 WHERE "Common" = 'Galliate'
CREATE TABLE table_53627 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What did Melbourne score as the home team?
SELECT "Home team score" FROM table_53627 WHERE "Home team" = 'melbourne'
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 ...
how many current patients are of age 40s?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.dischtime IS NULL AND admissions.age BETWEEN 40 AND 49
CREATE TABLE table_23483 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
how many records were made on february 22
SELECT COUNT("Record") FROM table_23483 WHERE "Date" = 'February 22'
CREATE TABLE table_47378 ( "Rank" real, "Mountain Peak" text, "Region" text, "Mountain Range" text, "Location" text )
what is the region when the location is 49.7462 n 117.1419 w?
SELECT "Region" FROM table_47378 WHERE "Location" = '49.7462°n 117.1419°w'
CREATE TABLE table_25563779_4 ( champion VARCHAR, third VARCHAR )
If the third name is Bruno Bonifacio, what is the champion?
SELECT champion FROM table_25563779_4 WHERE third = "Bruno Bonifacio"
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewTaskResults ( Id number, Review...
number of users by tag.
SELECT Location, COUNT(*) FROM Users WHERE Location LIKE '%portugal%' OR Location LIKE '%lisbon%' OR Location LIKE '%lisboa%' GROUP BY Location