answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(_percentage_of_total_deportees) FROM table_16048129_5 WHERE average_family_size = "2.8" | What is the total number of regions where the average family size is 2.8? | CREATE TABLE table_16048129_5 (_percentage_of_total_deportees VARCHAR, average_family_size VARCHAR) |
SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200) | Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200. | CREATE TABLE departments (department_id VARCHAR, manager_id INTEGER); CREATE TABLE employees (department_id VARCHAR, manager_id INTEGER) |
SELECT "Launch Pad" FROM table_31682 WHERE "Launch date/time (UTC)" = '25 december 2010 10:34' | Tell me the launch pad for 25 december 2010 10:34 | CREATE TABLE table_31682 (
"Flight" text,
"Launch date/time (UTC)" text,
"Variant" text,
"Launch Pad" text,
"Payload" text,
"Payload Mass" text
) |
SELECT region_of_ussr FROM table_16048129_5 WHERE _percentage_of_total_deportees = "10.6" | What regions of the USSR have a percentage of deportees of 10.6? | CREATE TABLE table_16048129_5 (region_of_ussr VARCHAR, _percentage_of_total_deportees VARCHAR) |
SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara") | display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara. | CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR) |
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 = 'coronary artery disease' AND DATETIME(diagnosis.di... | what are the four most frequent drugs that were prescribed to coronary artery disease female patients 20s within 2 months after they were diagnosed with coronary artery disease in this year? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age te... |
SELECT MAX(number_of_families) FROM table_16048129_5 WHERE average_family_size = "2.7" | What is the most number of families in regions where average family size is 2.7? | CREATE TABLE table_16048129_5 (number_of_families INTEGER, average_family_size VARCHAR) |
SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara") AND first_name <> "Clara" | display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara. | CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR) |
SELECT diagnoses.icd9_code, diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "92796" | what is the diagnosis icd9 and diagnosis long title of subject id 92796? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... |
SELECT COUNT(number_of_families) FROM table_16048129_5 WHERE _percentage_of_total_deportees = "5.8" | How many total families are there in regions with 5.8 percent of the population being made up of deportees? | CREATE TABLE table_16048129_5 (number_of_families VARCHAR, _percentage_of_total_deportees VARCHAR) |
SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%') | display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a ’T’. | CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, department_id VARCHAR) |
SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-161415' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) AND NOT patient.admissionweight IS NULL O... | how much does the weight of patient 006-161415 vary last measured on the first hospital visit compared to the second to last value measured on the first hospital visit? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)... |
SELECT MAX(number_of_families) FROM table_16048129_5 WHERE _percentage_of_total_deportees = "5.8" | What is the most number of families among regions where the population is made up of 5.8% deportees? | CREATE TABLE table_16048129_5 (number_of_families INTEGER, _percentage_of_total_deportees VARCHAR) |
SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%') | display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name. | CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2174.0" AND prescriptions.formulary_drug_cd = "OSEL75" | provide the number of patients whose year of death is less than or equal to 2174 and drug code is osel75? | 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,
... |
SELECT operator FROM table_1603807_2 WHERE line = "Mamariga Shuttle" | Which operator runs the Mamariga shuttle line? | CREATE TABLE table_1603807_2 (operator VARCHAR, line VARCHAR) |
SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN') | display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN. | CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, salary INTEGER) |
SELECT "Chassis" FROM table_67243 WHERE "Year" = '1951' | What chassis has a year of 1951? | CREATE TABLE table_67243 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) |
SELECT COUNT(length) FROM table_1603807_2 WHERE line = "line 3" | How many lengths of line 3 are given? | CREATE TABLE table_1603807_2 (length VARCHAR, line VARCHAR) |
SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN') | display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN. | CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, job_id VARCHAR, salary INTEGER) |
SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-17866')) AND lab.labname = 'fio2' AND STRFTIME('%y', lab.labresulttime) = '2105' | patient 004-17866 has received a fio2 lab test in 2105? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid ... |
SELECT terminals FROM table_1603807_2 WHERE line = "line 2" | What are the terminals for line 2? | CREATE TABLE table_1603807_2 (terminals VARCHAR, line VARCHAR) |
SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2 | display the department id and the total salary for those departments which contains at least two employees. | CREATE TABLE employees (department_id VARCHAR, salary INTEGER) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2144" AND diagnoses.icd9_code = "28802" | how many patients whose admission year is less than 2144 and diagnoses icd9 code is 28802? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... |
SELECT status FROM table_1603807_2 WHERE line = "Airport line" | What is the status of the airport line? | CREATE TABLE table_1603807_2 (status VARCHAR, line VARCHAR) |
SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history) | display all the information of those employees who did not have any job in the past. | CREATE TABLE job_history (employee_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR) |
SELECT institution FROM table_12434380_1 WHERE mascot = "Blue Devils" | What is the name of the institution with the mascot of blue devils? | CREATE TABLE table_12434380_1 (
institution VARCHAR,
mascot VARCHAR
) |
SELECT COUNT(hangul_chosongul) FROM table_160510_5 WHERE area = "8,352" | Name the total number of hangul chosongul for 8,352 | CREATE TABLE table_160510_5 (hangul_chosongul VARCHAR, area VARCHAR) |
SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id | display the department ID, full name (first and last name), salary for those employees who is highest salary in every department. | CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR) |
SELECT COUNT("delegate") FROM table_203_247 WHERE "counties represented" = 'allegany' | how many delegates represented allegany ? | CREATE TABLE table_203_247 (
id number,
"district" text,
"counties represented" text,
"delegate" text,
"party" text,
"first elected" number,
"committee" text
) |
SELECT iso FROM table_160510_5 WHERE rr_romaja = "Chungcheongnam" | Name the iso for chungcheongnam | CREATE TABLE table_160510_5 (iso VARCHAR, rr_romaja VARCHAR) |
SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id | display the first and last name, department, city, and state province for each employee. | CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR, location_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR); CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR) |
SELECT title FROM table_name_12 WHERE catalog__number = "pcr 502" | What CD has a catalog # of PCR 502? | CREATE TABLE table_name_12 (
title VARCHAR,
catalog__number VARCHAR
) |
SELECT country FROM table_160510_5 WHERE area = "11,891" | Name the country for 11,891 area | CREATE TABLE table_160510_5 (country VARCHAR, area VARCHAR) |
SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%' | display those employees who contain a letter z to their first name and also display their last name, city. | CREATE TABLE locations (city VARCHAR, location_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR) |
SELECT "2nd Party" FROM table_80170 WHERE "2nd Member" = 'john barneby' AND "1st Party" = 'conservative' | What was the 2nd Party that had the 2nd Member John Barneby, when the 1st Party was Conservative? | CREATE TABLE table_80170 (
"Election" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text
) |
SELECT COUNT(region) FROM table_160510_5 WHERE hangul_chosongul = "경상남도" | Name the number of region for 경상남도 | CREATE TABLE table_160510_5 (region VARCHAR, hangul_chosongul VARCHAR) |
SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id | display the department name, city, and state province for each department. | CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR); CREATE TABLE departments (department_name VARCHAR, location_id VARCHAR) |
SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'adv eff insulin/antidiab') AND STRFTIME('%y', diagnoses_icd.charttime) <= '2104' GROUP BY STRFTIME('%y... | what was the maximum monthly number of patients diagnosed with adv eff insulin/antidiab until 2104? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid nu... |
SELECT m_r_romaja FROM table_160510_5 WHERE region = "Kwanbuk" | Name the m r romaja for kwanbuk | CREATE TABLE table_160510_5 (m_r_romaja VARCHAR, region VARCHAR) |
SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id | display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working. | CREATE TABLE countries (country_name VARCHAR, country_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR); CREATE TABLE locations (location_id VARCHAR, country_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, employee_id VARCHAR, department_id VARCHAR) |
SELECT "Date" FROM table_5620 WHERE "Record" = '4–0–0' | On what date was the record 4 0 0? | CREATE TABLE table_5620 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) |
SELECT pop_density_people_km_2 FROM table_1606824_1 WHERE population__percentage_of_eu = "1.1%" AND member_state = "Slovakia" | Name the population density where population % is 1.1% for slovakia | CREATE TABLE table_1606824_1 (pop_density_people_km_2 VARCHAR, population__percentage_of_eu VARCHAR, member_state VARCHAR) |
SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name | display the department name and number of employees in each of the department. | CREATE TABLE employees (department_id VARCHAR); CREATE TABLE departments (department_id VARCHAR) |
SELECT date FROM table_20996923_20 WHERE city = "San Antonio, Texas" | What is the date when the city is San Antonio, Texas? | CREATE TABLE table_20996923_20 (
date VARCHAR,
city VARCHAR
) |
SELECT COUNT(pop_density_people_km_2) FROM table_1606824_1 WHERE population__percentage_of_eu = "1.7%" | Name the population density people where population % eu for 1.7% | CREATE TABLE table_1606824_1 (pop_density_people_km_2 VARCHAR, population__percentage_of_eu VARCHAR) |
SELECT first_name, last_name, salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London' | display the full name (first and last name), and salary of those employees who working in any department located in London. | CREATE TABLE locations (location_id VARCHAR, city VARCHAR); CREATE TABLE employees (department_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR) |
SELECT COUNT(fastest_lap) FROM table_19751479_4 WHERE rnd = 10 AND pole_position = "#99 GAINSCO/Bob Stallings Racing" | How many races had #99 gainsco/bob stallings racing in round 10? | CREATE TABLE table_19751479_4 (
fastest_lap VARCHAR,
rnd VARCHAR,
pole_position VARCHAR
) |
SELECT COUNT(area_km_2) FROM table_1606824_1 WHERE pop_density_people_km_2 = "87" | Name the number of area km 2 for population density is 87 | CREATE TABLE table_1606824_1 (area_km_2 VARCHAR, pop_density_people_km_2 VARCHAR) |
SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1 | What is the name of the song that was released in the most recent year? | CREATE TABLE song (song_name VARCHAR, releasedate VARCHAR) |
SELECT cover_model FROM table_name_8 WHERE date = "8-03" | Which Cover Model was featured on 8-03? | CREATE TABLE table_name_8 (
cover_model VARCHAR,
date VARCHAR
) |
SELECT population__percentage_of_eu FROM table_1606824_1 WHERE member_state = "Greece" | Name the population % of eu for greece | CREATE TABLE table_1606824_1 (population__percentage_of_eu VARCHAR, member_state VARCHAR) |
SELECT f_id FROM files ORDER BY duration DESC LIMIT 1 | What is the id of the longest song? | CREATE TABLE files (f_id VARCHAR, duration VARCHAR) |
SELECT SUM("Starts") FROM table_76600 WHERE "Avg. Finish" > '43' | How many starts for an average finish greater than 43? | CREATE TABLE table_76600 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 10" real,
"Avg. Start" real,
"Avg. Finish" real,
"Winnings" text,
"Position" text
) |
SELECT COUNT(network) FROM table_160728_4 WHERE channel = 7 | How many networks are there that have a channel number 7? | CREATE TABLE table_160728_4 (network VARCHAR, channel VARCHAR) |
SELECT song_name FROM song WHERE languages = "english" | Find the names of all English songs. | CREATE TABLE song (song_name VARCHAR, languages VARCHAR) |
SELECT "Time" FROM table_43630 WHERE "Round" < '2' AND "Opponent" = 'valentijn overeem' | What is Time, when Round is less than 2, and when Opponent is 'Valentijn Overeem'? | CREATE TABLE table_43630 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) |
SELECT network FROM table_160728_4 WHERE station = "TV3" | What station on the network is tv3? | CREATE TABLE table_160728_4 (network VARCHAR, station VARCHAR) |
SELECT f_id FROM files WHERE formats = "mp3" | What are the id of songs whose format is mp3. | CREATE TABLE files (f_id VARCHAR, formats VARCHAR) |
SELECT "Season" FROM table_43168 WHERE "Acquisition via" = 'rookie draft' AND "Number" = '15' | What is the Season with an Acquisition via of rookie draft, and the number is 15? | CREATE TABLE table_43168 (
"Name" text,
"Position" text,
"Number" text,
"School/Club Team" text,
"Season" text,
"Acquisition via" text
) |
SELECT MAX(founded) FROM table_16078390_2 WHERE team_nickname = "Raiders" | What year was the team named the Raiders established? | CREATE TABLE table_16078390_2 (founded INTEGER, team_nickname VARCHAR) |
SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9 | List the name and country of origin for all singers who have produced songs with rating above 9. | CREATE TABLE song (artist_name VARCHAR, rating INTEGER); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR) |
SELECT winning_constructor FROM table_name_95 WHERE name = "roussillon grand prix" | Which Constructor won the Roussillon Grand Prix? | CREATE TABLE table_name_95 (
winning_constructor VARCHAR,
name VARCHAR
) |
SELECT primary_conference FROM table_16078390_2 WHERE institution = "Gonzaga University" | What conference does Gonzaga University play in? | CREATE TABLE table_16078390_2 (primary_conference VARCHAR, institution VARCHAR) |
SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800 | List the file size and format for all songs that have resolution lower than 800. | CREATE TABLE song (f_id VARCHAR, resolution INTEGER); CREATE TABLE files (file_size VARCHAR, formats VARCHAR, f_id VARCHAR) |
SELECT "Attendance" FROM table_54492 WHERE "Score" = '4-10' | When the Score was 4-10, what was the Attendance? | CREATE TABLE table_54492 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) |
SELECT COUNT(founded) FROM table_16078390_2 WHERE location = "Tacoma, Washington" | How many Universities were founded in Tacoma, Washington? | CREATE TABLE table_16078390_2 (founded VARCHAR, location VARCHAR) |
SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1 | What is the name of the artist who produced the shortest song? | CREATE TABLE files (f_id VARCHAR, duration VARCHAR); CREATE TABLE song (artist_name VARCHAR, f_id VARCHAR) |
SELECT "To par" FROM table_50174 WHERE "Score" = '67-71=138' | What was the To par for the player whose final score was 67-71=138? | CREATE TABLE table_50174 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) |
SELECT institution FROM table_16078390_2 WHERE team_nickname = "Wildcats" | Which school's team has the nickname of the Wildcats? | CREATE TABLE table_16078390_2 (institution VARCHAR, team_nickname VARCHAR) |
SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3 | What are the names and countries of origin for the artists who produced the top three highly rated songs. | CREATE TABLE song (artist_name VARCHAR, rating VARCHAR); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR) |
SELECT MIN(pick__number) FROM table_2679061_2 WHERE nhl_team = "Montreal Canadiens" AND college_junior_club_team = "Trois-Rivières Draveurs (QMJHL)" | what is the pick # when the nhl team is montreal canadiens and the college/junior/club team is trois-rivi res draveurs (qmjhl)? | CREATE TABLE table_2679061_2 (
pick__number INTEGER,
nhl_team VARCHAR,
college_junior_club_team VARCHAR
) |
SELECT MIN(founded) FROM table_16078390_2 WHERE location = "Ellensburg, Washington" | What year was the university that is located in Ellensburg, Washington established? | CREATE TABLE table_16078390_2 (founded INTEGER, location VARCHAR) |
SELECT COUNT(*) FROM files WHERE duration LIKE "4:%" | How many songs have 4 minute duration? | CREATE TABLE files (duration VARCHAR) |
SELECT AVG("Lost") FROM table_46666 WHERE "Goals Against" < '58' AND "Position" = '10' AND "Points 2" > '53' | For a team with a goals against less than 58, a position of 10, and a points 2 more than 53, what is the average lost? | CREATE TABLE table_46666 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Average 1" real,
"Points 2" real
) |
SELECT location FROM table_16078390_2 WHERE team_nickname = "Wolves" | Where is the university located that's nicknamed the Wolves? | CREATE TABLE table_16078390_2 (location VARCHAR, team_nickname VARCHAR) |
SELECT COUNT(*) FROM artist WHERE country = "Bangladesh" | How many artists are from Bangladesh? | CREATE TABLE artist (country VARCHAR) |
SELECT * FROM table_dev_38 WHERE (serum_creatinine >= 1.5 AND gender = 'male') OR (serum_creatinine >= 1.4 AND gender = 'female') OR creatinine_clearance_cl < 60 | have a serum creatinine greater than or equal to 1.5 milligrams / deciliter ( mg / dl ) ( male ) or greater than or equal to 1.4 mg / dl ( female ) , or a creatinine clearance less than 60 milliliters / minute ( ml / minute ) | CREATE TABLE table_dev_38 (
"id" int,
"gender" string,
"serum_potassium" float,
"systolic_blood_pressure_sbp" int,
"creatinine_clearance_cl" float,
"estimated_glomerular_filtration_rate_egfr" int,
"diastolic_blood_pressure_dbp" int,
"ace_inhibitors" bool,
"serum_creatinine" float,
... |
SELECT COUNT(viewers) FROM table_16072430_1 WHERE share = 7 AND weekly_rank = "64" | What is the total number of viewers where the share is 7 and the week rank is 64? | CREATE TABLE table_16072430_1 (viewers VARCHAR, share VARCHAR, weekly_rank VARCHAR) |
SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" | What is the average rating of songs produced by female artists? | CREATE TABLE song (rating INTEGER, artist_name VARCHAR); CREATE TABLE artist (artist_name VARCHAR, gender VARCHAR) |
SELECT "Home team score" FROM table_51472 WHERE "Away team" = 'collingwood' | What is the score of the home team that played Collingwood? | CREATE TABLE table_51472 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT COUNT(_number) FROM table_16072430_1 WHERE share > 7.0 | How many episodes have a share bigger than 7.0? | CREATE TABLE table_16072430_1 (_number VARCHAR, share INTEGER) |
SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1 | What is the most popular file format? | CREATE TABLE files (formats VARCHAR) |
SELECT "nationality" FROM table_203_824 GROUP BY "nationality" ORDER BY COUNT("player") DESC LIMIT 1 | the most players picked came from which nationality ? | CREATE TABLE table_203_824 (
id number,
"pick #" number,
"player" text,
"position" text,
"nationality" text,
"nhl team" text,
"college/junior/club team" text
) |
SELECT COUNT(_number) FROM table_16072430_1 WHERE weekly_rank = "TBA" AND timeslot = "8:00 P.M." | How many episodes have a weekly rank tba and are broadcast at 8:00 p.m.? | CREATE TABLE table_16072430_1 (_number VARCHAR, weekly_rank VARCHAR, timeslot VARCHAR) |
SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT artist_name FROM song WHERE languages = "english" | Find the names of the artists who are from UK and have produced English songs. | CREATE TABLE artist (artist_name VARCHAR, country VARCHAR, languages VARCHAR); CREATE TABLE song (artist_name VARCHAR, country VARCHAR, languages VARCHAR) |
SELECT "Participants/Recipients" FROM table_31285 WHERE "Film Festival" = '30th Hawaii International Film Festival' | Which films participated in the 30th Hawaii International Film Festival? | CREATE TABLE table_31285 (
"Film Festival" text,
"Date of ceremony" text,
"Category" text,
"Participants/Recipients" text,
"Result" text
) |
SELECT timeslot FROM table_16072430_1 WHERE air_date = "February 22, 2008" | What are the timeslot(s) for broadcast on February 22, 2008? | CREATE TABLE table_16072430_1 (timeslot VARCHAR, air_date VARCHAR) |
SELECT f_id FROM files WHERE formats = "mp4" INTERSECT SELECT f_id FROM song WHERE resolution < 1000 | Find the id of songs that are available in mp4 format and have resolution lower than 1000. | CREATE TABLE song (f_id VARCHAR, formats VARCHAR, resolution INTEGER); CREATE TABLE files (f_id VARCHAR, formats VARCHAR, resolution INTEGER) |
SELECT COUNT("Gold") FROM table_9299 WHERE "Silver" < '14' AND "Rank" > '8' AND "Bronze" = '3' | How much Gold has a Silver smaller than 14, and a Rank larger than 8, and a Bronze of 3? | CREATE TABLE table_9299 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT COUNT(air_date) FROM table_16072430_1 WHERE weekly_rank = "73" | What broadcast dates have a weekly rank of 73? | CREATE TABLE table_16072430_1 (air_date VARCHAR, weekly_rank VARCHAR) |
SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" AND T2.languages = "bangla" | What is the country of origin of the artist who is female and produced a song in Bangla? | CREATE TABLE artist (country VARCHAR, artist_name VARCHAR, gender VARCHAR); CREATE TABLE song (artist_name VARCHAR, languages VARCHAR) |
SELECT ratings__5_capital_cities_ FROM table_name_82 WHERE episode_no = "wonder drug" | What was the rating of the episode Wonder Drug? | CREATE TABLE table_name_82 (
ratings__5_capital_cities_ VARCHAR,
episode_no VARCHAR
) |
SELECT date_of_appointment FROM table_16075179_6 WHERE team = "St. Johnstone" | When was the date of appointment for St. Johnstone's manager? | CREATE TABLE table_16075179_6 (date_of_appointment VARCHAR, team VARCHAR) |
SELECT AVG(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" AND T2.resolution < 800 | What is the average duration of songs that have mp3 format and resolution below 800? | CREATE TABLE files (duration INTEGER, f_id VARCHAR, formats VARCHAR); CREATE TABLE song (f_id VARCHAR, resolution VARCHAR) |
SELECT "Eastern #2" FROM table_56898 WHERE "Western #2" = 'oakland' | Tell me the eastern #2 for western #2 of oakland | CREATE TABLE table_56898 (
"Week" real,
"EASTERN #1" text,
"Eastern #2" text,
"WESTERN #1" text,
"Western #2" text
) |
SELECT outgoing_manager FROM table_16075179_6 WHERE team = "Aberdeen" | Who was the outgoing manager for Aberdeen? | CREATE TABLE table_16075179_6 (outgoing_manager VARCHAR, team VARCHAR) |
SELECT COUNT(*), gender FROM artist GROUP BY gender | What is the number of artists for each gender? | CREATE TABLE artist (gender VARCHAR) |
SELECT "Visitor" FROM table_44238 WHERE "Date" = 'march 26' | Who visited on march 26? | CREATE TABLE table_44238 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Attendance" real,
"Record" text,
"Points" real
) |
SELECT date_of_appointment FROM table_16075179_6 WHERE outgoing_manager = "Wim Jansen" | When was the date of appointment for the manager replacing Wim Jansen? | CREATE TABLE table_16075179_6 (date_of_appointment VARCHAR, outgoing_manager VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.