answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night' | what are the names of the channels that broadcast in both morning and night? | CREATE TABLE channel (name VARCHAR, channel_id VARCHAR); CREATE TABLE broadcast (channel_id VARCHAR, time_of_day VARCHAR) |
SELECT score FROM table_name_54 WHERE home = "hornets" | What is the Score with a Home with hornets? | CREATE TABLE table_name_54 (
score VARCHAR,
home VARCHAR
) |
SELECT original_title FROM table_16255245_1 WHERE film_title_used_in_nomination = "The Counterfeiters" | Name the original title for the counterfeiters | CREATE TABLE table_16255245_1 (original_title VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day | how many programs are broadcast in each time section of the day? | CREATE TABLE broadcast (time_of_day VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Surgical operation with anastomosis, bypass, or graft, with natural or artificial tissues u... | what is the number of patients whose diagnoses long title is surgical operation with anastomosis, bypass, or graft, with natural or artificial tissues used as implant causing abnormal patient reaction, or later complication, without mention of misadventure at time of operation and drug type is base? | 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 year__ceremony_ FROM table_16255245_1 WHERE original_title = "Spiele Leben" | Name the year for spiele leben | CREATE TABLE table_16255245_1 (year__ceremony_ VARCHAR, original_title VARCHAR) |
SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' | find the number of different programs that are broadcast during night time. | CREATE TABLE broadcast (program_id VARCHAR, time_of_day VARCHAR) |
SELECT "Team classification" FROM table_2615 WHERE "Malaysian team classification" = 'MNCF Continental Team' | Which team classification has malaysian team classification of mncf continental team? | CREATE TABLE table_2615 (
"Stage" real,
"Stage winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Malaysian rider classification" text,
"Team classification" text,
"Malaysian team classification" text
) |
SELECT film_title_used_in_nomination FROM table_16255245_1 WHERE original_title = "Wohin und zurück - Welcome in Vienna" | Name the film title for wohin und zurück - welcome in vienna | CREATE TABLE table_16255245_1 (film_title_used_in_nomination VARCHAR, original_title VARCHAR) |
SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" | Find the names of programs that are never broadcasted in the morning. | CREATE TABLE broadcast (program_id VARCHAR, Time_of_day VARCHAR); CREATE TABLE program (name VARCHAR, program_id VARCHAR); CREATE TABLE program (name VARCHAR) |
SELECT SUM(cuts_made) FROM table_name_62 WHERE wins < 1 AND top_5 = 1 AND top_10 > 4 | How many cuts were made when there weren't any wins but had a top-5 of 1 and a top 10 larger than 4? | CREATE TABLE table_name_62 (
cuts_made INTEGER,
top_10 VARCHAR,
wins VARCHAR,
top_5 VARCHAR
) |
SELECT language FROM table_16278349_1 WHERE province = "Kunar" | Name the language for kunar | CREATE TABLE table_16278349_1 (language VARCHAR, province VARCHAR) |
SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Night" | find the program owners that have some programs in both morning and night time. | CREATE TABLE broadcast (program_id VARCHAR, Time_of_day VARCHAR); CREATE TABLE program (owner VARCHAR, program_id VARCHAR) |
SELECT LAST_NAME, MANAGER_ID FROM employees ORDER BY LAST_NAME | Give me a histogram, that simply displays the last name of the employee and the corresponding manager id, could you show by the x-axis in asc? | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END... |
SELECT notes FROM table_16278349_1 WHERE province = "Samangan" | Name the notes for samangan | CREATE TABLE table_16278349_1 (notes VARCHAR, province VARCHAR) |
SELECT origin FROM program ORDER BY origin | List all program origins in the alphabetical order. | CREATE TABLE program (origin VARCHAR) |
SELECT wins FROM table_name_40 WHERE podiums = "0" AND series = "masters of formula 3" | Which Wins has Podiums of 0, and a Series of masters of formula 3? | CREATE TABLE table_name_40 (
wins VARCHAR,
podiums VARCHAR,
series VARCHAR
) |
SELECT un_region FROM table_16278349_1 WHERE population = 3314000 | Name the un region for 3314000 population | CREATE TABLE table_16278349_1 (un_region VARCHAR, population VARCHAR) |
SELECT COUNT(DISTINCT OWNER) FROM channel | what is the number of different channel owners? | CREATE TABLE channel (OWNER VARCHAR) |
SELECT team FROM table_name_94 WHERE pick = 80 | What team picked 80? | CREATE TABLE table_name_94 (
team VARCHAR,
pick VARCHAR
) |
SELECT area__km²_ FROM table_16278349_1 WHERE map__number = 24 | Name the area for map # 24 | CREATE TABLE table_16278349_1 (area__km²_ VARCHAR, map__number VARCHAR) |
SELECT name FROM program WHERE origin <> 'Beijing' | find the names of programs whose origin is not in Beijing. | CREATE TABLE program (name VARCHAR, origin VARCHAR) |
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ... | what are the three most frequent drugs that were prescribed to female patients of the 50s within 2 months after having been diagnosed with drug-induced delirium? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,... |
SELECT un_region FROM table_16278349_1 WHERE population = 378000 | Name the un region for 378000 population | CREATE TABLE table_16278349_1 (un_region VARCHAR, population VARCHAR) |
SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' | What are the names of the channels owned by CCTV or HBS? | CREATE TABLE channel (name VARCHAR, OWNER VARCHAR) |
SELECT "Directed by" FROM table_73969 WHERE "Production code" = '177605' | Who directed the episode with production code 177605? | CREATE TABLE table_73969 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Patient Portrayer" text,
"Original air date" text,
"Production code" real
) |
SELECT COUNT(population) FROM table_16278825_1 WHERE towns__villages = 217 | NJame the total number of population for towns/villages for 217 | CREATE TABLE table_16278825_1 (population VARCHAR, towns__villages VARCHAR) |
SELECT SUM(Rating_in_percent), OWNER FROM channel GROUP BY OWNER | Find the total rating ratio for each channel owner. | CREATE TABLE channel (OWNER VARCHAR, Rating_in_percent INTEGER) |
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment ORDER BY COUNT(date_of_enrolment) | How many enrolment students in each month? Return a bar chart binning date of enrolment by month interval, and I want to order in asc by the y-axis. | CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password... |
SELECT towns__villages FROM table_16278825_1 WHERE county_seat = "Budapest" | Name the towns/villages for budapest | CREATE TABLE table_16278825_1 (towns__villages VARCHAR, county_seat VARCHAR) |
SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1 | Find the name of the program that is broadcast most frequently. | CREATE TABLE program (name VARCHAR, program_id VARCHAR); CREATE TABLE broadcast (program_id VARCHAR) |
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'norepinephrine 4 mg/250 ml ns') | how much does norepinephrine 4 mg/250 ml ns cost to take? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartr... |
SELECT MIN(area__km²_) FROM table_16278825_1 WHERE name_of_county = "Vas" | Name the least area for vas | CREATE TABLE table_16278825_1 (area__km²_ INTEGER, name_of_county VARCHAR) |
SELECT COUNT(*) FROM COURSES | How many courses are there in total? | CREATE TABLE COURSES (Id VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LIVER TRANSPLANT" AND demographic.days_stay > "8" | give me the number of patients whose primary disease is liver transplant and days of hospital stay is greater than 8? | 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 points_won FROM table_1628607_5 WHERE year = "1992" | When the year was 1992, what were the points won? | CREATE TABLE table_1628607_5 (points_won VARCHAR, year VARCHAR) |
SELECT course_description FROM COURSES WHERE course_name = "database" | What are the descriptions of the courses with name "database"? | CREATE TABLE COURSES (course_description VARCHAR, course_name VARCHAR) |
SELECT COUNT(*) FROM Votes WHERE VoteTypeId = 4 AND CreationDate > '2018-10-18 00:00:00.000' | R/A Flags Before and After HNQ. | CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId numb... |
SELECT points__percentage FROM table_1628607_5 WHERE foursomes_w_l_h = "1–0–0 won w/ P. Creamer 3&2" | When the foursome was w-l-h is 1–0–0 won w/ p. creamer 3&2, what was the points %? | CREATE TABLE table_1628607_5 (points__percentage VARCHAR, foursomes_w_l_h VARCHAR) |
SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = "Cathrine" | What are the addresses of the course authors or tutors with personal name "Cathrine" | CREATE TABLE Course_Authors_and_Tutors (address_line_1 VARCHAR, personal_name VARCHAR) |
SELECT "Margin of victory" FROM table_68002 WHERE "Tournament" = 'mississippi gulf resort classic' | What was the margin of victory for the Mississippi Gulf Resort Classic? | CREATE TABLE table_68002 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) |
SELECT foursomes_w_l_h FROM table_1628607_5 WHERE year = "2002" | What was the foursome's record in 2002? | CREATE TABLE table_1628607_5 (foursomes_w_l_h VARCHAR, year VARCHAR) |
SELECT address_line_1 FROM Course_Authors_and_Tutors | List the addresses of all the course authors or tutors. | CREATE TABLE Course_Authors_and_Tutors (address_line_1 VARCHAR) |
SELECT "name" FROM table_204_741 ORDER BY "rank" DESC LIMIT 1 | who was the last ranked competitor in group a ? | CREATE TABLE table_204_741 (
id number,
"rank" number,
"name" text,
"nationality" text,
"1,62" text,
"1,67" text,
"1,72" text,
"1,75" text,
"notes" text
) |
SELECT length FROM table_16279520_1 WHERE release = "3.5" | What was the length time of the 3.5 release? | CREATE TABLE table_16279520_1 (length VARCHAR, release VARCHAR) |
SELECT login_name, family_name FROM Course_Authors_and_Tutors | List all the login names and family names of course author and tutors. | CREATE TABLE Course_Authors_and_Tutors (login_name VARCHAR, family_name VARCHAR) |
SELECT COUNT("Events") FROM table_38401 WHERE "Top-25" < '2' | How many events resulted in a top-25 less than 2? | CREATE TABLE table_38401 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) |
SELECT title FROM table_16279520_1 WHERE release = "1.1" | What is the title of the 1.1 realease? | CREATE TABLE table_16279520_1 (title VARCHAR, release VARCHAR) |
SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment | List all the dates of enrollment and completion of students. | CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR, date_of_completion VARCHAR) |
SELECT g_name, rating FROM genre ORDER BY g_name | What are the names of all genres in alphabetical order, combined with its ratings? | CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
... |
SELECT series FROM table_16279520_1 WHERE release = "3.5" | Under what series was the 3.5 release? | CREATE TABLE table_16279520_1 (series VARCHAR, release VARCHAR) |
SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment | How many distinct students are enrolled in courses? | CREATE TABLE Student_Course_Enrolment (student_id VARCHAR) |
SELECT "Driver" FROM table_57940 WHERE "Year" = '1955' | What is the name of the driver in 1955? | CREATE TABLE table_57940 (
"Year" text,
"Driver" text,
"Constructor" text,
"Category" text,
"Location" text,
"Report" text
) |
SELECT release FROM table_16279520_1 WHERE timeline = "Season 2" | What is the releases number under Season 2? | CREATE TABLE table_16279520_1 (release VARCHAR, timeline VARCHAR) |
SELECT COUNT(course_id) FROM Student_Course_Enrolment | How many distinct courses are enrolled in by students? | CREATE TABLE Student_Course_Enrolment (course_id VARCHAR) |
SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3118)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'drain out #1 ja... | until 09/2103 has patient 3118 had any drain out #1 jackson pratt output? | CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... |
SELECT capital FROM table_16278894_1 WHERE county = "Bungoma" | What is the capital of Bungoma county? | CREATE TABLE table_16278894_1 (capital VARCHAR, county VARCHAR) |
SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass" | Find the dates of the tests taken with result "Pass". | CREATE TABLE Student_Tests_Taken (date_test_taken VARCHAR, test_result VARCHAR) |
SELECT "temple name" FROM table_204_465 ORDER BY "period of reign" DESC LIMIT 1 | what was the last baekje temple ? | CREATE TABLE table_204_465 (
id number,
"#" number,
"temple name" text,
"hangul" text,
"hanja" text,
"period of reign" text,
"personal name" text,
"relationship" text,
"note" text
) |
SELECT capital FROM table_16278894_1 WHERE county = "Uasin Gishu" | What is the capital of Uasin Gishu county? | CREATE TABLE table_16278894_1 (capital VARCHAR, county VARCHAR) |
SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = "Fail" | How many tests have result "Fail"? | CREATE TABLE Student_Tests_Taken (test_result VARCHAR) |
SELECT record FROM table_23685152_2 WHERE opponent = "Eskimos" | What was the record in the game against Eskimos? | CREATE TABLE table_23685152_2 (
record VARCHAR,
opponent VARCHAR
) |
SELECT former_province FROM table_16278894_1 WHERE area__km_2__ = "694.9" | In what former province was the area 694.9 kilometers squared? | CREATE TABLE table_16278894_1 (former_province VARCHAR, area__km_2__ VARCHAR) |
SELECT login_name FROM Students WHERE family_name = "Ward" | What are the login names of the students with family name "Ward"? | CREATE TABLE Students (login_name VARCHAR, family_name VARCHAR) |
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | What courses I am required to take before MUSED 370 ? | CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requi... |
SELECT COUNT(area__km_2__) FROM table_16278894_1 WHERE population_census_2009 = 240075 | How many numbers were listed under area with a population of 240075 as of 2009? | CREATE TABLE table_16278894_1 (area__km_2__ VARCHAR, population_census_2009 VARCHAR) |
SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" | What are the dates of the latest logon of the students with family name "Jaskolski" or "Langosh"? | CREATE TABLE Students (date_of_latest_logon VARCHAR, family_name VARCHAR) |
SELECT date FROM table_name_42 WHERE opponent_number = "iowa" | what is the date when the opponent# is iowa? | CREATE TABLE table_name_42 (
date VARCHAR,
opponent_number VARCHAR
) |
SELECT population_census_2009 FROM table_16278894_1 WHERE county = "Kisumu" | What was the population in Kisumu county as of 2009? | CREATE TABLE table_16278894_1 (population_census_2009 VARCHAR, county VARCHAR) |
SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%" | How many students have personal names that contain the word "son"? | CREATE TABLE Students (personal_name VARCHAR) |
SELECT DEPT_CODE, SUM(STU_HRS) FROM STUDENT GROUP BY DEPT_CODE ORDER BY SUM(STU_HRS) DESC | Return a bar chart on how many hours do the students spend studying in each department?, could you sort in descending by the sum stu hrs please? | CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIG... |
SELECT capital FROM table_16278894_1 WHERE population_census_2009 = 730129 | What capital's county had a population of 730129 as of 2009? | CREATE TABLE table_16278894_1 (capital VARCHAR, population_census_2009 VARCHAR) |
SELECT subject_name FROM SUBJECTS | List all the subject names. | CREATE TABLE SUBJECTS (subject_name VARCHAR) |
SELECT meter_400, ID FROM swimmer ORDER BY ID | Show id from each meter 400, and sort y-axis in ascending order. | CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE... |
SELECT COUNT(dates) FROM table_1628792_1 WHERE margin_of_victory = "5 strokes" | Name the dates for margin of victory being 5 strokes | CREATE TABLE table_1628792_1 (dates VARCHAR, margin_of_victory VARCHAR) |
SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name | List all the information about course authors and tutors in alphabetical order of the personal name. | CREATE TABLE Course_Authors_and_Tutors (personal_name VARCHAR) |
SELECT class FROM table_1745843_8 WHERE part_4 = "giheizan" | What class in the word with part 4 'giheizan'? | CREATE TABLE table_1745843_8 (
class VARCHAR,
part_4 VARCHAR
) |
SELECT champion FROM table_1628792_1 WHERE tournament_location = "London Hunt and country Club ( London , ON )" | Name the champion for london hunt and country club ( london , on ) | CREATE TABLE table_1628792_1 (champion VARCHAR, tournament_location VARCHAR) |
SELECT personal_name, family_name FROM Students ORDER BY family_name | List the personal names and family names of all the students in alphabetical order of family name. | CREATE TABLE Students (personal_name VARCHAR, family_name VARCHAR) |
SELECT score FROM table_name_67 WHERE opponent = "new zealand warriors" | What was the score with the opponent being New Zealand Warriors? | CREATE TABLE table_name_67 (
score VARCHAR,
opponent VARCHAR
) |
SELECT evening_gown FROM table_16323766_3 WHERE interview = "7.600 (9)" | What was the evening gown score for the woman who scored 7.600 (9) in her interview? | CREATE TABLE table_16323766_3 (evening_gown VARCHAR, interview VARCHAR) |
SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC | List each test result and its count in descending order of count. | CREATE TABLE Student_Tests_Taken (test_result VARCHAR) |
SELECT shooter FROM table_name_43 WHERE event = "wc munich" AND rank_points = "8" | What shooter has wc munich as the event, and 8 as the rank points? | CREATE TABLE table_name_43 (
shooter VARCHAR,
event VARCHAR,
rank_points VARCHAR
) |
SELECT swimsuit FROM table_16323766_3 WHERE semifinal_average = "8.759 (5)" | What was the swimsuit score for the one who had a semifinal average of 8.759 (5)? | CREATE TABLE table_16323766_3 (swimsuit VARCHAR, semifinal_average VARCHAR) |
SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database" | Find the login name of the course author that teaches the course with name "advanced database". | CREATE TABLE Courses (author_id VARCHAR, course_name VARCHAR); CREATE TABLE Course_Authors_and_Tutors (login_name VARCHAR, author_id VARCHAR) |
SELECT "T. Papadopoulos" FROM table_69604 WHERE "I. Kasoulidis" = '27.1%' | What was the percentage for T. Papadopoulos when I. Kasoulidis was 27.1%? | CREATE TABLE table_69604 (
"Polling Firm" text,
"Date Published" text,
"T. Papadopoulos" text,
"D. Christofias" text,
"I. Kasoulidis" text,
"K. Themistokleous" text
) |
SELECT evening_gown FROM table_16323766_3 WHERE preliminary_average = "8.121 (8)" | What was the evening gown score for the one who had a preliminary average of 8.121 (8)? | CREATE TABLE table_16323766_3 (evening_gown VARCHAR, preliminary_average VARCHAR) |
SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "operating system" OR T2.course_name = "data structure" | Find the addresses of the course authors who teach the course with name "operating system" or "data structure". | CREATE TABLE Courses (author_id VARCHAR, course_name VARCHAR); CREATE TABLE Course_Authors_and_Tutors (address_line_1 VARCHAR, author_id VARCHAR) |
SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code | Give the maximum product price for each product type in a pie chart. | CREATE TABLE Supplier_Addresses (
supplier_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Staff_Department_Assignments (
staff_id INTEGER,
department_id INTEGER,
date_assigned_from DATETIME,
job_title_code VARCHAR(10),
date_assigned_to DATETIME
)... |
SELECT preliminary_average FROM table_16323766_3 WHERE semifinal_average = "8.966 (3)" | What was the preliminary average for the one who had a semifinal average of 8.966 (3)? | CREATE TABLE table_16323766_3 (preliminary_average VARCHAR, semifinal_average VARCHAR) |
SELECT T1.personal_name, T1.family_name, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1 | Find the personal name, family name, and author ID of the course author that teaches the most courses. | CREATE TABLE Courses (author_id VARCHAR); CREATE TABLE Course_Authors_and_Tutors (personal_name VARCHAR, family_name VARCHAR, author_id VARCHAR) |
SELECT AVG("Top-25") FROM table_51787 WHERE "Wins" > '0' | What is the average top-25 value for majors that have more than 0 wins? | CREATE TABLE table_51787 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) |
SELECT preliminary_average FROM table_16323766_3 WHERE state = "Mississippi" | What was the preliminary average for Miss Mississippi? | CREATE TABLE table_16323766_3 (preliminary_average VARCHAR, state VARCHAR) |
SELECT T1.address_line_1, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING COUNT(*) >= 2 | Find the addresses and author IDs of the course authors that teach at least two courses. | CREATE TABLE Courses (author_id VARCHAR); CREATE TABLE Course_Authors_and_Tutors (address_line_1 VARCHAR, author_id VARCHAR) |
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '018-47575' AND patient.hospitaladmitsource = 'emergency department' | were patient 018-47575 in the emergency room? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number... |
SELECT preliminary_average FROM table_16323766_3 WHERE state = "Maryland" | What was the preliminary average for Miss Maryland? | CREATE TABLE table_16323766_3 (preliminary_average VARCHAR, state VARCHAR) |
SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = "Julio" | Find the names of courses taught by the tutor who has personal name "Julio". | CREATE TABLE Course_Authors_and_Tutors (author_id VARCHAR, personal_name VARCHAR); CREATE TABLE Courses (course_name VARCHAR, author_id VARCHAR) |
SELECT away_team AS score FROM table_name_34 WHERE crowd > 28 OFFSET 536 | What team played in front of 28,536 at an away stadium? | CREATE TABLE table_name_34 (
away_team VARCHAR,
crowd INTEGER
) |
SELECT dates__mdy_ FROM table_16331025_2 WHERE gross_sales = "$1,271,451" | What day was the gross sales $1,271,451? | CREATE TABLE table_16331025_2 (dates__mdy_ VARCHAR, gross_sales VARCHAR) |
SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = "Computer Science" | Find the names and descriptions of courses that belong to the subject named "Computer Science". | CREATE TABLE Courses (course_name VARCHAR, course_description VARCHAR, subject_id VARCHAR); CREATE TABLE Subjects (subject_id VARCHAR, subject_name VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.