answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(*) FROM Lessons WHERE lesson_status_code = "Cancelled" | How many lessons were in cancelled state? | CREATE TABLE Lessons (lesson_status_code VARCHAR) |
SELECT COUNT(*) FROM table_203_538 WHERE "result" = 'partial failure' | how many partial failures of h ii flights were there ? | CREATE TABLE table_203_538 (
id number,
"flight" text,
"date" text,
"payload nickname" text,
"payload" text,
"orbit" text,
"result" text
) |
SELECT air_force___navy_score FROM table_1850339_2 WHERE season = 1983 | What was the Air Force - Navy score in the 1983 season? | CREATE TABLE table_1850339_2 (air_force___navy_score VARCHAR, season VARCHAR) |
SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" AND nickname LIKE "%s%" | List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'. | CREATE TABLE Lessons (lesson_id VARCHAR, staff_id VARCHAR); CREATE TABLE Staff (staff_id VARCHAR, first_name VARCHAR, last_name VARCHAR) |
SELECT pick__number FROM table_name_49 WHERE round = 10 | What is Pick #, when Round is '10'? | CREATE TABLE table_name_49 (
pick__number VARCHAR,
round VARCHAR
) |
SELECT COUNT(season) FROM table_1850339_2 WHERE army___navy_score = "10 Dec. 2016 at Baltimore, MD (M&T Bank Stadium)" | How many different season have an Army - Navy score of 10 dec. 2016 at Baltimore, MD (M&T Bank Stadium)? | CREATE TABLE table_1850339_2 (season VARCHAR, army___navy_score VARCHAR) |
SELECT COUNT(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%" | How many lessons taught by staff whose first name has letter 'a' in it? | CREATE TABLE Lessons (staff_id VARCHAR); CREATE TABLE Staff (staff_id VARCHAR, first_name VARCHAR) |
SELECT SUM("population 2006") FROM table_203_834 WHERE id IN (SELECT id FROM table_203_834 WHERE "province" = 'ontario' ORDER BY "population 2006" DESC LIMIT 5) | what was the total population of the five largest cities in the province of ontario in 2006 ? | CREATE TABLE table_203_834 (
id number,
"rank" number,
"census subdivision" text,
"province" text,
"type" text,
"land area\n(km2, 2011)" number,
"population 2011" number,
"population 2006" number,
"population 2001" number,
"population 1996" number,
"change in % 2006-2011" num... |
SELECT COUNT(tourism_receipts__2003___as__percentage_of_exports_) FROM table_18524_6 WHERE tourism_competitiveness__2011___ttci_ = "3.26" | Name the tourism receipts 2003 for tourism competitiveness 3.26 | CREATE TABLE table_18524_6 (tourism_receipts__2003___as__percentage_of_exports_ VARCHAR, tourism_competitiveness__2011___ttci_ VARCHAR) |
SELECT SUM(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" | How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn? | CREATE TABLE Lessons (staff_id VARCHAR); CREATE TABLE Staff (staff_id VARCHAR, first_name VARCHAR, last_name VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.icd9_code = "5185" | how many of the patients admitted to emergency had icd9 code 5185? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... |
SELECT tourism_receipts__2003___as__percentage_of_gdp_ FROM table_18524_6 WHERE country = "Colombia" | Name the tourism receipts 2003 for colombia | CREATE TABLE table_18524_6 (tourism_receipts__2003___as__percentage_of_gdp_ VARCHAR, country VARCHAR) |
SELECT AVG(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" | What is average lesson price taught by staff with first name as Janessa and last name as Sawayn? | CREATE TABLE Lessons (staff_id VARCHAR); CREATE TABLE Staff (staff_id VARCHAR, first_name VARCHAR, last_name VARCHAR) |
SELECT "Opponent" FROM table_69265 WHERE "Score" = '1–6, 6–4, 6–4' | Name the opponent with score of 1 6, 6 4, 6 4 | CREATE TABLE table_69265 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) |
SELECT COUNT(tourism_receipts__2011___us) AS $_per_capita_ FROM table_18524_6 WHERE tourism_receipts__2003___as__percentage_of_gdp_ = "13.5" | Name the total number of tourism receipts 2011 where tourism receipts 2003 13.5 | CREATE TABLE table_18524_6 (tourism_receipts__2011___us VARCHAR, tourism_receipts__2003___as__percentage_of_gdp_ VARCHAR) |
SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Ray" | How many lesson does customer with first name Ray took? | CREATE TABLE Customers (customer_id VARCHAR, first_name VARCHAR); CREATE TABLE Lessons (customer_id VARCHAR) |
SELECT "Elite Eight" FROM table_31634 WHERE "Conference" = 'atlantic 10' | How many elite eight teams came from the Atlantic 10? | CREATE TABLE table_31634 (
"Conference" text,
"# of Bids" real,
"Record" text,
"Win %" text,
"Round of 32" text,
"Elite Eight" text,
"Final Four" text,
"Championship Game" text
) |
SELECT owner FROM table_18536769_1 WHERE branding = "Classic Hits 102.1 CJCY" | When classic hits 102.1 cjcy is the branding who is the owner? | CREATE TABLE table_18536769_1 (owner VARCHAR, branding VARCHAR) |
SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff | Which last names are both used by customers and by staff? | CREATE TABLE Customers (last_name VARCHAR); CREATE TABLE Staff (last_name VARCHAR) |
SELECT "Year startup" FROM table_5930 WHERE "Operator" = 'nioc' | What was the startup year for the project with a nioc operator? | CREATE TABLE table_5930 (
"Country" text,
"Project Name" text,
"Year startup" text,
"Operator" text,
"Peak" text
) |
SELECT call_sign FROM table_18536769_1 WHERE format = "hot adult contemporary" | When hot adult contemporary is the format what is the call sign? | CREATE TABLE table_18536769_1 (call_sign VARCHAR, format VARCHAR) |
SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id | What is the first name of the staff who did not give any lesson? | CREATE TABLE Lessons (staff_id VARCHAR); CREATE TABLE Staff (first_name VARCHAR); CREATE TABLE Staff (first_name VARCHAR, staff_id VARCHAR) |
SELECT "Team Name" FROM table_37155 WHERE "Poles" = '0' AND "Final Placing" = '29th' | Which Team Name has Poles of 0, and a Final Placing of 29th? | CREATE TABLE table_37155 (
"Season" real,
"Series" text,
"Team Name" text,
"Races" text,
"Wins" text,
"Poles" text,
"F/Laps" text,
"Podiums" text,
"Points" text,
"Final Placing" text
) |
SELECT COUNT(call_sign) FROM table_18536769_1 WHERE owner = "Vista Radio" | When vista radio is the owner how many call signs are there? | CREATE TABLE table_18536769_1 (call_sign VARCHAR, owner VARCHAR) |
SELECT T1.vehicle_id, T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY COUNT(*) DESC LIMIT 1 | What is the id and detail of the vehicle used in lessons for most of the times? | CREATE TABLE Lessons (vehicle_id VARCHAR); CREATE TABLE Vehicles (vehicle_id VARCHAR, vehicle_details VARCHAR) |
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-42758' AND NOT patient.hospit... | what was the name of the drug patient 033-42758 was prescribed within 2 days after receiving a sedative agent - propofol in the first hospital encounter? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CRE... |
SELECT COUNT(format) FROM table_18536769_1 WHERE frequency = "FM 97.3" | When fm 97.3 is the frequency how many formats are there? | CREATE TABLE table_18536769_1 (format VARCHAR, frequency VARCHAR) |
SELECT COUNT(*) FROM Faculty | How many faculty do we have? | CREATE TABLE Faculty (Id VARCHAR) |
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-35416')) AND intakeoutput.cellpath LIKE '%ou... | what was the total amount of output for patient 002-35416 on 05/06/last year? | 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... |
SELECT frequency FROM table_18536769_1 WHERE owner = "Vista Radio" | When vista radio is the owner what is the frequency? | CREATE TABLE table_18536769_1 (frequency VARCHAR, owner VARCHAR) |
SELECT DISTINCT rank FROM Faculty | What ranks do we have for faculty? | CREATE TABLE Faculty (rank VARCHAR) |
SELECT result FROM table_name_17 WHERE venue = "dakar , senegal" AND date = "3 september 2011" AND score = "2–0" | What was the result at dakar , senegal, on 3 september 2011, and with a Score of 2 0? | CREATE TABLE table_name_17 (
result VARCHAR,
score VARCHAR,
venue VARCHAR,
date VARCHAR
) |
SELECT team FROM table_18522916_5 WHERE date_of_appointment = "5 September 2008" AND date_of_vacancy = "30 August 2008" | Name the team for 5 september 2008 for date of vacancy for 30 august 2008 | CREATE TABLE table_18522916_5 (team VARCHAR, date_of_appointment VARCHAR, date_of_vacancy VARCHAR) |
SELECT DISTINCT building FROM Faculty | Show all the distinct buildings that have faculty rooms. | CREATE TABLE Faculty (building VARCHAR) |
SELECT "Runs Conceded" FROM table_20280 WHERE "Name" = 'Chaminda Vaas' | How many runs conceded for chaminda vaas? | CREATE TABLE table_20280 (
"Name" text,
"Overs Bowled" text,
"Maidens" real,
"Runs Conceded" real,
"Wickets" real,
"Extras" real,
"E.R." text
) |
SELECT date_of_vacancy FROM table_18522916_5 WHERE outgoing_manager = "Daniel Uberti" | Name the date of vacancy for daniel uberti | CREATE TABLE table_18522916_5 (date_of_vacancy VARCHAR, outgoing_manager VARCHAR) |
SELECT rank, Fname, Lname FROM Faculty | Show the rank, first name, and last name for all the faculty. | CREATE TABLE Faculty (rank VARCHAR, Fname VARCHAR, Lname VARCHAR) |
SELECT services, COUNT(services) FROM station GROUP BY local_authority, services ORDER BY COUNT(services) DESC | Group by the local authorities and count the number of local authorities, and then group by services, could you rank by the Y in desc? | 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,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CR... |
SELECT manner_of_departure FROM table_18522916_5 WHERE date_of_vacancy = "25 August 2008" | Name the manner of departure for date of vacancy 25 august 2008 | CREATE TABLE table_18522916_5 (manner_of_departure VARCHAR, date_of_vacancy VARCHAR) |
SELECT Fname, Lname, phone FROM Faculty WHERE Sex = 'F' | Show the first name, last name, and phone number for all female faculty members. | CREATE TABLE Faculty (Fname VARCHAR, Lname VARCHAR, phone VARCHAR, Sex VARCHAR) |
SELECT COUNT(printing_process) FROM table_25468520_1 WHERE theme = "Rotary International : 100 Years in Canada" | How many time is the theme rotary international : 100 years in canada? | CREATE TABLE table_25468520_1 (
printing_process VARCHAR,
theme VARCHAR
) |
SELECT date_of_vacancy FROM table_18522916_5 WHERE date_of_appointment = "29 December 2008" | Name the date of vacancy for 29 december 2008 being date of appointment | CREATE TABLE table_18522916_5 (date_of_vacancy VARCHAR, date_of_appointment VARCHAR) |
SELECT FacID FROM Faculty WHERE Sex = 'M' | Show ids for all the male faculty. | CREATE TABLE Faculty (FacID VARCHAR, Sex VARCHAR) |
SELECT MIN("Election") FROM table_64198 WHERE "President" = 'leonardo marras' AND "Inhabitants" < '227,063' | What was the lowest election result for President Leonardo Marras with an area smaller than 227,063 people? | CREATE TABLE table_64198 (
"Province" text,
"Inhabitants" real,
"established" real,
"President" text,
"Party" text,
"Election" real
) |
SELECT COUNT(directed_by) FROM table_1854728_2 WHERE production_code = "1008/1009" | When 1008/1009 is the production code how many directors are there? | CREATE TABLE table_1854728_2 (directed_by VARCHAR, production_code VARCHAR) |
SELECT COUNT(*) FROM Faculty WHERE Sex = 'F' AND Rank = "Professor" | How many female Professors do we have? | CREATE TABLE Faculty (Sex VARCHAR, Rank VARCHAR) |
SELECT départ_de_la_main_gauche FROM table_name_26 WHERE mode = "do" | What is the Depart de la main gauche of the do Mode? | CREATE TABLE table_name_26 (
départ_de_la_main_gauche VARCHAR,
mode VARCHAR
) |
SELECT directed_by FROM table_1854728_2 WHERE written_by = "Arthur Heinemann" | When arthur heinemann is the writer who is the director? | CREATE TABLE table_1854728_2 (directed_by VARCHAR, written_by VARCHAR) |
SELECT phone, room, building FROM Faculty WHERE Fname = "Jerry" AND Lname = "Prince" | Show the phone, room, and building for the faculty named Jerry Prince. | CREATE TABLE Faculty (phone VARCHAR, room VARCHAR, building VARCHAR, Fname VARCHAR, Lname VARCHAR) |
SELECT molecules FROM table_name_8 WHERE percent_of_mass = "1.0" | what is the molecules when the percent mass is 1.0? | CREATE TABLE table_name_8 (
molecules VARCHAR,
percent_of_mass VARCHAR
) |
SELECT running_with__in_team_ FROM table_1855841_1 WHERE candidate = "Elizabeth Falco" | Name the running with for elizabeth falco | CREATE TABLE table_1855841_1 (running_with__in_team_ VARCHAR, candidate VARCHAR) |
SELECT COUNT(*) FROM Faculty WHERE Rank = "Professor" AND building = "NEB" | How many Professors are in building NEB? | CREATE TABLE Faculty (Rank VARCHAR, building VARCHAR) |
SELECT "Score in the final" FROM table_13705 WHERE "Surface" = 'clay' AND "Date" = '18 april 2011' | What is the score in the final of the tournament with a clay surface on 18 April 2011? | CREATE TABLE table_13705 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) |
SELECT office_running_for FROM table_1855841_1 WHERE candidate = "Carol Marsh" | Name the officing running for for carol marsh | CREATE TABLE table_1855841_1 (office_running_for VARCHAR, candidate VARCHAR) |
SELECT fname, lname FROM Faculty WHERE Rank = "Instructor" | Show the first name and last name for all the instructors. | CREATE TABLE Faculty (fname VARCHAR, lname VARCHAR, Rank VARCHAR) |
SELECT "Event" FROM table_51072 WHERE "Distance" = 'ft10in (m)' | Which event has a distance of ft10in (m)? | CREATE TABLE table_51072 (
"Date" text,
"Distance" text,
"Handler" text,
"Event" text,
"Location" text
) |
SELECT office_running_for FROM table_1855841_1 WHERE candidate = "Anthony Mussara" | Name the office running for for anthony mussara | CREATE TABLE table_1855841_1 (office_running_for VARCHAR, candidate VARCHAR) |
SELECT building, COUNT(*) FROM Faculty GROUP BY building | Show all the buildings along with the number of faculty members the buildings have. | CREATE TABLE Faculty (building VARCHAR) |
SELECT language_s_ FROM table_18994724_1 WHERE film_title_used_in_nomination = "Everlasting Moments" | What language was spoken in Everlasting Moments? | CREATE TABLE table_18994724_1 (
language_s_ VARCHAR,
film_title_used_in_nomination VARCHAR
) |
SELECT votes_given FROM table_1855841_1 WHERE running_with__in_team_ = "Michael Russo, Genevy Dimitrion , Manny Ortega" | Name the votes given for michael russo, genevy dimitrion , manny ortega | CREATE TABLE table_1855841_1 (votes_given VARCHAR, running_with__in_team_ VARCHAR) |
SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1 | Which building has most faculty members? | CREATE TABLE Faculty (building VARCHAR) |
SELECT "Country" FROM table_39261 WHERE "Rank" = '5' | Which Country has a Rank of 5? | CREATE TABLE table_39261 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Events" real,
"Wins" real
) |
SELECT position FROM table_1858574_3 WHERE sail_number = "6606" | Qhat was the position of sail 6606? | CREATE TABLE table_1858574_3 (position VARCHAR, sail_number VARCHAR) |
SELECT building FROM Faculty WHERE rank = "Professor" GROUP BY building HAVING COUNT(*) >= 10 | Show all the buildings that have at least 10 professors. | CREATE TABLE Faculty (building VARCHAR, rank VARCHAR) |
SELECT PHONE_NUMBER, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of phone_number and commission_pct , sort in desc by the bars. | 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),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... |
SELECT yacht FROM table_1858574_3 WHERE sail_number = "AUS70" | On what yacht was the sail number aus70? | CREATE TABLE table_1858574_3 (yacht VARCHAR, sail_number VARCHAR) |
SELECT rank, COUNT(*) FROM Faculty GROUP BY rank | For each faculty rank, show the number of faculty members who have it. | CREATE TABLE Faculty (rank VARCHAR) |
SELECT SUM(position) FROM table_name_32 WHERE played > 9 | Which Position has a Played larger than 9? | CREATE TABLE table_name_32 (
position INTEGER,
played INTEGER
) |
SELECT COUNT(rank) FROM table_18590048_1 WHERE release_date = "21 October 1992" | How many titles were released on 21 October 1992? | CREATE TABLE table_18590048_1 (rank VARCHAR, release_date VARCHAR) |
SELECT rank, sex, COUNT(*) FROM Faculty GROUP BY rank, sex | Show all the ranks and the number of male and female faculty for each rank. | CREATE TABLE Faculty (rank VARCHAR, sex VARCHAR) |
SELECT "location" FROM table_204_845 WHERE "date" < (SELECT "date" FROM table_204_845 WHERE "location" = 'montreal' AND "date" = 'august 24') ORDER BY "date" DESC LIMIT 1 | what city was the race held before montreal on august 24 ? | CREATE TABLE table_204_845 (
id number,
"round" number,
"circuit" text,
"location" text,
"date" text,
"pole position" text,
"fastest lap" text,
"winning driver" text,
"headline event" text
) |
SELECT MIN(rank) FROM table_18590048_1 WHERE title = "Super Mario Land 2: 6 Golden Coins" | What rank is Super Mario Land 2: 6 Golden Coins? | CREATE TABLE table_18590048_1 (rank INTEGER, title VARCHAR) |
SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) LIMIT 1 | Which rank has the smallest number of faculty members? | CREATE TABLE Faculty (rank VARCHAR) |
SELECT 2010 FROM table_name_44 WHERE 2007 = "grand slam tournaments" | What is the 2010 for the grand slam tournaments of 2007? | CREATE TABLE table_name_44 (
Id VARCHAR
) |
SELECT platform FROM table_18590048_1 WHERE units_sold__in_millions_ = "11.18" | What platform sold 11.18 million units? | CREATE TABLE table_18590048_1 (platform VARCHAR, units_sold__in_millions_ VARCHAR) |
SELECT sex, COUNT(*) FROM Faculty WHERE rank = "AsstProf" GROUP BY sex | Show the number of male and female assistant professors. | CREATE TABLE Faculty (sex VARCHAR, rank VARCHAR) |
SELECT date FROM table_name_10 WHERE winner = "dick johnson" AND race_title = "calder" | On what date did Dick Johnson with at Calder? | CREATE TABLE table_name_10 (
date VARCHAR,
winner VARCHAR,
race_title VARCHAR
) |
SELECT release_date FROM table_18590048_1 WHERE units_sold__in_millions_ = "9.87" | What day did the platform sell 9.87 million units? | CREATE TABLE table_18590048_1 (release_date VARCHAR, units_sold__in_millions_ VARCHAR) |
SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith" | What are the first name and last name of Linda Smith's advisor? | CREATE TABLE Student (advisor VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE Faculty (fname VARCHAR, lname VARCHAR, FacID VARCHAR) |
SELECT MIN("NO votes") FROM table_73834 WHERE "% YES" = '45.60%' | HOw many no votes were there when there were 45.60% yes votes | CREATE TABLE table_73834 (
"meas. num" real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
) |
SELECT COUNT(round) FROM table_1859269_1 WHERE new_entries_this_round = "65" | If new entries this round is 65, what is the round? | CREATE TABLE table_1859269_1 (round VARCHAR, new_entries_this_round VARCHAR) |
SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = "Professor" | Show the ids of students whose advisors are professors. | CREATE TABLE Student (StuID VARCHAR, advisor VARCHAR); CREATE TABLE Faculty (FacID VARCHAR, rank VARCHAR) |
SELECT "goals\nscored" FROM table_203_30 WHERE "team" = 'a.d. isidro metapan' | what were the number of goals scored by team a.d.isidro metapan ? | CREATE TABLE table_203_30 (
id number,
"place" number,
"team" text,
"played" number,
"won" number,
"draw" number,
"lost" number,
"goals\nscored" number,
"goals\nconceded" number,
"+/-" number,
"points" number
) |
SELECT MAX(clubs_remaining) FROM table_1859269_1 WHERE leagues_entering_at_this_round = "Süper Lig" | If leagues entering this round is Süper Lig, what is the maximum amount of clubs remaining? | CREATE TABLE table_1859269_1 (clubs_remaining INTEGER, leagues_entering_at_this_round VARCHAR) |
SELECT T2.fname, T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = "Michael" AND T1.lname = "Goodrich" | Show first name and last name for all the students advised by Michael Goodrich. | CREATE TABLE Faculty (FacID VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE Student (fname VARCHAR, lname VARCHAR, advisor VARCHAR) |
SELECT driver FROM table_name_35 WHERE time_retired = "+1 lap" AND constructor = "bar - honda" | What driver has a ime/Retired of +1 lap, and a Constructor of bar - honda? | CREATE TABLE table_name_35 (
driver VARCHAR,
time_retired VARCHAR,
constructor VARCHAR
) |
SELECT round FROM table_1859269_1 WHERE winners_from_previous_round = "8" | If the winners from the previous round is 8, what is the round? | CREATE TABLE table_1859269_1 (round VARCHAR, winners_from_previous_round VARCHAR) |
SELECT T1.FacID, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID | Show the faculty id of each faculty member, along with the number of students he or she advises. | CREATE TABLE Faculty (FacID VARCHAR); CREATE TABLE Student (advisor VARCHAR) |
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14154 AND admissions.dischtime IS NULL) AND transfers.careunit = 'csru' ORDER BY transfers.intime DESC LIMIT 1 | how many hours has it been since the last time patient 14154 stayed in careunit csru during their current hospital encounter? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
r... |
SELECT new_entries_this_round FROM table_1859269_1 WHERE round = "Semi-finals" | If the round is the semi-finals, what are the new entries this round? | CREATE TABLE table_1859269_1 (new_entries_this_round VARCHAR, round VARCHAR) |
SELECT T1.rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank | Show all the faculty ranks and the number of students advised by each rank. | CREATE TABLE Student (advisor VARCHAR); CREATE TABLE Faculty (rank VARCHAR, FacID VARCHAR) |
SELECT Hometown, COUNT(Hometown) FROM member GROUP BY Hometown ORDER BY COUNT(Hometown) DESC | Bar chart of the number of hometown from each hometown, and I want to display total number in descending order. | CREATE TABLE member (
Member_ID int,
Card_Number text,
Name text,
Hometown text,
Level int
)
CREATE TABLE branch (
Branch_ID int,
Name text,
Open_year text,
Address_road text,
City text,
membership_amount text
)
CREATE TABLE purchase (
Member_ID int,
Branch_ID text,... |
SELECT MAX(losses) FROM table_18594107_2 WHERE team = "Atl. Colegiales" | How many losses for the team atl. colegiales? | CREATE TABLE table_18594107_2 (losses INTEGER, team VARCHAR) |
SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY COUNT(*) DESC LIMIT 1 | What are the first and last name of the faculty who has the most students? | CREATE TABLE Student (advisor VARCHAR); CREATE TABLE Faculty (fname VARCHAR, lname VARCHAR, FacID VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2069" AND lab.label = "Amylase" | provide the number of patients whose year of birth is less than 2069 and lab test name is amylase? | 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 te... |
SELECT MIN(points) FROM table_18594107_2 WHERE scored = 14 | How many points when the score is 14? | CREATE TABLE table_18594107_2 (points INTEGER, scored VARCHAR) |
SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING COUNT(*) >= 2 | Show the ids for all the faculty members who have at least 2 students. | CREATE TABLE Faculty (FacID VARCHAR); CREATE TABLE Student (advisor VARCHAR) |
SELECT SUM(pages) FROM table_name_36 WHERE translated_title = "thistle among roses" | I want the sum of pages for thistle among roses | CREATE TABLE table_name_36 (
pages INTEGER,
translated_title VARCHAR
) |
SELECT MAX(draws) FROM table_18594107_2 WHERE scored = 13 | How many draws are there when the score is 13? | CREATE TABLE table_18594107_2 (draws INTEGER, scored VARCHAR) |
SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student | Show ids for the faculty members who don't advise any student. | CREATE TABLE Faculty (FacID VARCHAR, advisor VARCHAR); CREATE TABLE Student (FacID VARCHAR, advisor VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.