answer
stringlengths 6
3.91k
| question
stringlengths 7
766
| context
stringlengths 27
7.14k
|
|---|---|---|
SELECT "Team" FROM table_75775 WHERE "Against" > '8' AND "Lost" = '7' AND "Position" = '5'
|
What team has an against more than 8, lost of 7, and the position is 5?
|
CREATE TABLE table_75775 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
|
SELECT MAX(wins) FROM table_18703133_1 WHERE team = "Sport Colombia"
|
Name the most wins for sport colombia
|
CREATE TABLE table_18703133_1 (wins INTEGER, team VARCHAR)
|
SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'
|
What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?
|
CREATE TABLE bridge (LOCATION VARCHAR, name VARCHAR)
|
SELECT driver FROM table_name_74 WHERE grid < 24 AND laps < 61 AND constructor = "ferrari"
|
Who has a grid smaller than 24, less than 61 laps, and a ferrari constructor?
|
CREATE TABLE table_name_74 (
driver VARCHAR,
constructor VARCHAR,
grid VARCHAR,
laps VARCHAR
)
|
SELECT COUNT(played) FROM table_18703133_1 WHERE losses = 5
|
Namr the total number of played for 5 losses
|
CREATE TABLE table_18703133_1 (played VARCHAR, losses VARCHAR)
|
SELECT name FROM mill WHERE name LIKE '%Moulin%'
|
Which of the mill names contains the french word 'Moulin'?
|
CREATE TABLE mill (name VARCHAR)
|
SELECT COUNT("Attendance") FROM table_8660 WHERE "Game site" = 'candlestick park'
|
What is the total attendance for Candlestick Park?
|
CREATE TABLE table_8660 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
)
|
SELECT MIN(scored) FROM table_18703133_6 WHERE position = 6
|
What is scored with the position of 6?
|
CREATE TABLE table_18703133_6 (scored INTEGER, position VARCHAR)
|
SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80
|
What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?
|
CREATE TABLE architect (Id VARCHAR); CREATE TABLE mill (name VARCHAR, architect_id VARCHAR); CREATE TABLE bridge (architect_id VARCHAR, length_meters INTEGER)
|
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC
|
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of code , and group by attribute name, rank bars in descending order.
|
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
|
SELECT losses FROM table_18703133_6 WHERE team = "Tembetary"
|
How many losses are there for team tembetary?
|
CREATE TABLE table_18703133_6 (losses VARCHAR, team VARCHAR)
|
SELECT TYPE, COUNT(*) FROM mill GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
|
What is the most common mill type, and how many are there?
|
CREATE TABLE mill (TYPE VARCHAR)
|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "48" AND lab.itemid = "51438"
|
what is the number of patients whose age is less than 48 and item id is 51438?
|
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,
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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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
)
|
SELECT wins FROM table_18703133_6 WHERE points = 24
|
How many wins have 24 points?
|
CREATE TABLE table_18703133_6 (wins VARCHAR, points VARCHAR)
|
SELECT COUNT(*) FROM architect WHERE NOT id IN (SELECT architect_id FROM mill WHERE built_year < 1850)
|
How many architects haven't built a mill before year 1850?
|
CREATE TABLE mill (id VARCHAR, architect_id VARCHAR, built_year INTEGER); CREATE TABLE architect (id VARCHAR, architect_id VARCHAR, built_year INTEGER)
|
SELECT "Name" FROM table_60243 WHERE "Date of Birth" = '1982-01-29'
|
Who is born on 1982-01-29?
|
CREATE TABLE table_60243 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"Date of Birth" text,
"Club" text
)
|
SELECT MAX(wins) FROM table_18703133_6
|
How many wins?
|
CREATE TABLE table_18703133_6 (wins INTEGER)
|
SELECT t1.name FROM bridge AS t1 JOIN architect AS t2 ON t1.architect_id = t2.id WHERE t2.nationality = 'American' ORDER BY t1.length_feet
|
show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.
|
CREATE TABLE bridge (name VARCHAR, architect_id VARCHAR, length_feet VARCHAR); CREATE TABLE architect (id VARCHAR, nationality VARCHAR)
|
SELECT date FROM table_name_23 WHERE country = "indonesia"
|
What was the date of the tournament held in Indonesia?
|
CREATE TABLE table_name_23 (
date VARCHAR,
country VARCHAR
)
|
SELECT original_air_date FROM table_18712423_3 WHERE directed_by = "Ian Barry" AND written_by = "Philip Dalkin"
|
What is the original air date of the episode directed by Ian Barry and written by Philip Dalkin?
|
CREATE TABLE table_18712423_3 (original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR)
|
SELECT COUNT(*) FROM book_club
|
How many book clubs are there?
|
CREATE TABLE book_club (Id VARCHAR)
|
SELECT "Candidates" FROM table_18468 WHERE "Incumbent" = 'Frank W. Boykin'
|
Which candidates were in the election where Frank W. Boykin was an incumbent?
|
CREATE TABLE table_18468 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
|
SELECT MIN(series_episode) FROM table_18712423_3 WHERE viewers__millions_ = "1.215"
|
What is the show episode number of the episode that reached 1.215 millions views?
|
CREATE TABLE table_18712423_3 (series_episode INTEGER, viewers__millions_ VARCHAR)
|
SELECT book_title, author_or_editor FROM book_club WHERE YEAR > 1989
|
show the titles, and authors or editors for all books made after the year 1989.
|
CREATE TABLE book_club (book_title VARCHAR, author_or_editor VARCHAR, YEAR INTEGER)
|
SELECT SUM(position) FROM table_name_36 WHERE drawn = 10 AND lost < 25 AND goal_difference = "+20" AND played < 42
|
What is the sum of the positions for the player who had less than 25 losses, a goal difference of +20, 10 draws, and played less than 42?
|
CREATE TABLE table_name_36 (
position INTEGER,
played VARCHAR,
goal_difference VARCHAR,
drawn VARCHAR,
lost VARCHAR
)
|
SELECT directed_by FROM table_18712423_3 WHERE written_by = "Matt Ford"
|
Who directed the episode written by Matt Ford?
|
CREATE TABLE table_18712423_3 (directed_by VARCHAR, written_by VARCHAR)
|
SELECT DISTINCT publisher FROM book_club
|
Show all distinct publishers for books.
|
CREATE TABLE book_club (publisher VARCHAR)
|
SELECT COUNT("Losses") FROM table_71293 WHERE "Goal Difference" = '5' AND "Draws" > '10' AND "Goals against" = '43'
|
How many losses are there with 5 goal differences, drew more than 10 times, and 43 goals against?
|
CREATE TABLE table_71293 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
)
|
SELECT COUNT(players_left_after_round_1) FROM table_18733480_1 WHERE team_1 = "Wykeham Wonderers"
|
How many times was team 1 the wykeham wonderers?
|
CREATE TABLE table_18733480_1 (players_left_after_round_1 VARCHAR, team_1 VARCHAR)
|
SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC
|
Show the years, book titles, and publishers for all books, in descending order by year.
|
CREATE TABLE book_club (YEAR VARCHAR, book_title VARCHAR, publisher VARCHAR)
|
SELECT "Status" FROM table_58174 WHERE "Monarch" = 'henry i' AND "Reason" = 'succession unclear 1100-1103'
|
What is the Status when Henry I is the Monarch and the Reason is succession unclear 1100-1103?
|
CREATE TABLE table_58174 (
"Heir" text,
"Status" text,
"Relationship to Monarch" text,
"Became heir" text,
"Reason" text,
"Ceased to be heir" text,
"Monarch" text
)
|
SELECT air_date FROM table_18733480_1 WHERE team_1 = "Wykeham Wonderers"
|
What is the original air date that had the wykeham wonderers as team 1?
|
CREATE TABLE table_18733480_1 (air_date VARCHAR, team_1 VARCHAR)
|
SELECT publisher, COUNT(*) FROM book_club GROUP BY publisher
|
Show all publishers and the number of books for each publisher.
|
CREATE TABLE book_club (publisher VARCHAR)
|
SELECT SUM(until) FROM table_name_80 WHERE titles = "5"
|
What is the total Until when the Titles was 5?
|
CREATE TABLE table_name_80 (
until INTEGER,
titles VARCHAR
)
|
SELECT team_1 FROM table_18733480_1 WHERE team_2 = "Chalkheads"
|
Who was team 1 when the chalkheads were team 2?
|
CREATE TABLE table_18733480_1 (team_1 VARCHAR, team_2 VARCHAR)
|
SELECT publisher FROM book_club GROUP BY publisher ORDER BY COUNT(*) DESC LIMIT 1
|
What is the publisher with most number of books?
|
CREATE TABLE book_club (publisher VARCHAR)
|
SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2498)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temperature c (calc)' AND d_items.linksto = 'chartevents') AND DATETIME(chartevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m-%d', chartevents.charttime) = '08-29' ORDER BY chartevents.valuenum DESC, chartevents.charttime DESC LIMIT 1
|
when was the last time on 08/29/last year that patient 2498 had the maximum temperature c (calc) for?
|
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label 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 icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
|
SELECT title FROM table_18734298_1 WHERE production_code = "1ACX09"
|
What is the title of the production code 1acx09?
|
CREATE TABLE table_18734298_1 (title VARCHAR, production_code VARCHAR)
|
SELECT category, COUNT(*) FROM book_club GROUP BY category
|
Show all book categories and the number of books in each category.
|
CREATE TABLE book_club (category VARCHAR)
|
SELECT pick FROM table_name_61 WHERE college = "boston college"
|
College of boston college has what pick?
|
CREATE TABLE table_name_61 (
pick VARCHAR,
college VARCHAR
)
|
SELECT COUNT(no_in_series) FROM table_18734298_1 WHERE directed_by = "Rob Renzetti"
|
How many series were directed by Rob Renzetti?
|
CREATE TABLE table_18734298_1 (no_in_series VARCHAR, directed_by VARCHAR)
|
SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING COUNT(*) >= 2
|
List categories that have at least two books after year 1989.
|
CREATE TABLE book_club (category VARCHAR, YEAR INTEGER)
|
SELECT MAX("Attendance") FROM table_16064 WHERE "Record" = '7-3'
|
The record of 7-3 had the largest attendance of what?
|
CREATE TABLE table_16064 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Vikings points" real,
"Opponents" real,
"Record" text,
"Attendance" real
)
|
SELECT written_by FROM table_18734298_1 WHERE no_in_series = 14
|
Who wrote the series number 14?
|
CREATE TABLE table_18734298_1 (written_by VARCHAR, no_in_series VARCHAR)
|
SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990
|
Show publishers with a book published in 1989 and a book in 1990.
|
CREATE TABLE book_club (publisher VARCHAR, YEAR VARCHAR)
|
SELECT player FROM table_name_71 WHERE country = "united states" AND place = "t6" AND score = 67 - 69 = 136
|
What player placed t6 for the United States with a score of 67-69=136?
|
CREATE TABLE table_name_71 (
player VARCHAR,
country VARCHAR,
place VARCHAR,
score VARCHAR
)
|
SELECT COUNT(winnings) FROM table_1875157_1 WHERE starts = 32
|
Did this driver have any winnings the season he had 32 starts
|
CREATE TABLE table_1875157_1 (winnings VARCHAR, starts VARCHAR)
|
SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989
|
Show all publishers which do not have a book in 1989.
|
CREATE TABLE book_club (publisher VARCHAR, YEAR VARCHAR)
|
SELECT "Date made" FROM table_67781 WHERE "Fleet numbers" = '4'
|
What is the date made that has an associated fleet number of 4?
|
CREATE TABLE table_67781 (
"Type" text,
"Fleet numbers" text,
"Quantity made" real,
"Manufacturer" text,
"Date made" text,
"Date withdrawn" text
)
|
SELECT winnings FROM table_1875157_1 WHERE position = "33rd"
|
How many wins in the season he finished 33rd
|
CREATE TABLE table_1875157_1 (winnings VARCHAR, position VARCHAR)
|
SELECT title, YEAR, director FROM movie ORDER BY budget_million
|
Show all movie titles, years, and directors, ordered by budget.
|
CREATE TABLE movie (title VARCHAR, YEAR VARCHAR, director VARCHAR, budget_million VARCHAR)
|
SELECT MAX(latin_americans_2001) FROM table_1939405_2 WHERE _percentage_2001 = "0.0%" AND _percentage_2011 = "0.2%"
|
How many Latin Americans were there in 2001 in the province with 0.0% 2001 and 0.2% 2011?
|
CREATE TABLE table_1939405_2 (
latin_americans_2001 INTEGER,
_percentage_2001 VARCHAR,
_percentage_2011 VARCHAR
)
|
SELECT MIN(top_10) FROM table_1875157_1
|
What is the lowest number of top 10 finishes
|
CREATE TABLE table_1875157_1 (top_10 INTEGER)
|
SELECT COUNT(DISTINCT director) FROM movie
|
How many movie directors are there?
|
CREATE TABLE movie (director VARCHAR)
|
SELECT branch FROM table_197446_1 WHERE term_began = "January 3, 1985"
|
What branch was involved when the term began in January 3, 1985?
|
CREATE TABLE table_197446_1 (
branch VARCHAR,
term_began VARCHAR
)
|
SELECT MAX(poles) FROM table_1875157_1 WHERE year = 2000
|
How many poles in the year 2000
|
CREATE TABLE table_1875157_1 (poles INTEGER, year VARCHAR)
|
SELECT title, director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1
|
What is the title and director for the movie with highest worldwide gross in the year 2000 or before?
|
CREATE TABLE movie (title VARCHAR, director VARCHAR, YEAR VARCHAR, gross_worldwide VARCHAR)
|
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'DUTCH' AND number = 339
|
I need to prep for DUTCH 339 , can I take a course to help me ?
|
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname 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_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
|
SELECT avg_finish FROM table_1875157_2 WHERE winnings = "$1,400"
|
What is the average finish for winnings of $1,400?
|
CREATE TABLE table_1875157_2 (avg_finish VARCHAR, winnings VARCHAR)
|
SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999
|
Show all director names who have a movie in both year 1999 and 2000.
|
CREATE TABLE movie (director VARCHAR, YEAR VARCHAR)
|
SELECT time FROM table_name_52 WHERE laps = 14
|
What is the total time that it took for the driver to finish 14 laps?
|
CREATE TABLE table_name_52 (
time VARCHAR,
laps VARCHAR
)
|
SELECT MAX(starts) FROM table_1875157_2 WHERE avg_finish = "16.5"
|
What is the maximum starts that result in an average finish of 16.5?
|
CREATE TABLE table_1875157_2 (starts INTEGER, avg_finish VARCHAR)
|
SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000
|
Show all director names who have a movie in the year 1999 or 2000.
|
CREATE TABLE movie (director VARCHAR, YEAR VARCHAR)
|
SELECT "2012" FROM table_41425 WHERE "2013" = '2r' AND "Tournament" = 'wimbledon'
|
What results in 2012 also has 2013 results of 2r and the tournament was Wimbledon?
|
CREATE TABLE table_41425 (
"Tournament" text,
"2003" text,
"2004" text,
"2012" text,
"2013" text
)
|
SELECT MIN(starts) FROM table_1875157_2 WHERE winnings = "$690,321"
|
How many starts were there when the winnings are $690,321?
|
CREATE TABLE table_1875157_2 (starts INTEGER, winnings VARCHAR)
|
SELECT AVG(budget_million), MAX(budget_million), MIN(budget_million) FROM movie WHERE YEAR < 2000
|
What is the average, maximum, and minimum budget for all movies before 2000.
|
CREATE TABLE movie (budget_million INTEGER, YEAR INTEGER)
|
SELECT score FROM table_name_12 WHERE date = "april 6, 2008"
|
What was the score on April 6, 2008?
|
CREATE TABLE table_name_12 (
score VARCHAR,
date VARCHAR
)
|
SELECT other_mozilla FROM table_1876262_10 WHERE safari = "3.76%"
|
If Safari is 3.76%, what is the other Mozilla amount?
|
CREATE TABLE table_1876262_10 (other_mozilla VARCHAR, safari VARCHAR)
|
SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'
|
List all company names with a book published by Alyson.
|
CREATE TABLE culture_company (company_name VARCHAR, book_club_id VARCHAR); CREATE TABLE book_club (book_club_id VARCHAR, publisher VARCHAR)
|
SELECT "Completion Schedule" FROM table_61443 WHERE "State" = 'himachal pradesh' AND "Total Capacity (MW)" = '800'
|
What is the completion schedule for himachal pradesh state with a total capacity (MW) of 800?
|
CREATE TABLE table_61443 (
"S.no." real,
"Power Plant" text,
"State" text,
"Total Capacity (MW)" real,
"Completion Schedule" text
)
|
SELECT other_mozilla FROM table_1876262_10 WHERE firefox = "30.45%"
|
If Firefox is 30.45%, what is the other Mozilla amount?
|
CREATE TABLE table_1876262_10 (other_mozilla VARCHAR, firefox VARCHAR)
|
SELECT T1.title, T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'
|
Show the movie titles and book titles for all companies in China.
|
CREATE TABLE movie (title VARCHAR, movie_id VARCHAR); CREATE TABLE culture_company (movie_id VARCHAR, book_club_id VARCHAR, incorporated_in VARCHAR); CREATE TABLE book_club (book_title VARCHAR, book_club_id VARCHAR)
|
SELECT nationality FROM table_name_51 WHERE player = "rudolf vercik"
|
Tell me the nationality for rudolf vercik
|
CREATE TABLE table_name_51 (
nationality VARCHAR,
player VARCHAR
)
|
SELECT safari FROM table_1876262_10 WHERE internet_explorer = "47.22%"
|
If Internet Explorer is 47.22%, what is the Safari total?
|
CREATE TABLE table_1876262_10 (safari VARCHAR, internet_explorer VARCHAR)
|
SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999
|
Show all company names with a movie directed in year 1999.
|
CREATE TABLE movie (movie_id VARCHAR, year VARCHAR); CREATE TABLE culture_company (company_name VARCHAR, movie_id VARCHAR)
|
SELECT "Age Group" FROM table_32538 WHERE "Event" = '200m breaststroke' AND "Time" = '6:37.73'
|
What age group has a time of 6:37.73 at the 200m breaststroke?
|
CREATE TABLE table_32538 (
"Pool" text,
"Age Group" text,
"Time" text,
"Event" text,
"Date" text
)
|
SELECT COUNT(other_mozilla) FROM table_1876262_10 WHERE period = "September 2009"
|
For period September 2009, what is the other Mozilla total number?
|
CREATE TABLE table_1876262_10 (other_mozilla VARCHAR, period VARCHAR)
|
SELECT COUNT(*) FROM singer
|
How many singers do we have?
|
CREATE TABLE singer (Id VARCHAR)
|
SELECT nationality FROM table_name_17 WHERE round = 4
|
Which Nationality has a Round of 4?
|
CREATE TABLE table_name_17 (
nationality VARCHAR,
round VARCHAR
)
|
SELECT COUNT(production_code) FROM table_1876825_2 WHERE written_by = "David Richardson" AND directed_by = "Todd Holland"
|
Name the total number of production code by david richardson and todd holland
|
CREATE TABLE table_1876825_2 (production_code VARCHAR, written_by VARCHAR, directed_by VARCHAR)
|
SELECT name, country, age FROM singer ORDER BY age DESC
|
Show name, country, age for all singers ordered by age from the oldest to the youngest.
|
CREATE TABLE singer (name VARCHAR, country VARCHAR, age VARCHAR)
|
SELECT "1981" FROM table_55045 WHERE "Tournament" = 'wimbledon'
|
What is the 1981 value at the Tournament of Wimbledon?
|
CREATE TABLE table_55045 (
"Tournament" text,
"1980" text,
"1981" text,
"1982" text,
"1983" text,
"1984" text,
"1985" text,
"1986" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text
)
|
SELECT COUNT(no_in_series) FROM table_1876825_2 WHERE original_air_date = "March 19, 2000"
|
Name the total number of series for march 19, 2000
|
CREATE TABLE table_1876825_2 (no_in_series VARCHAR, original_air_date VARCHAR)
|
SELECT AVG(age), MIN(age), MAX(age) FROM singer WHERE country = 'France'
|
What is the average, minimum, and maximum age of all singers from France?
|
CREATE TABLE singer (age INTEGER, country VARCHAR)
|
SELECT constructor FROM table_name_99 WHERE location = "not held" AND year = "1933"
|
What company constructed the vehicle in the location not held in 1933?
|
CREATE TABLE table_name_99 (
constructor VARCHAR,
location VARCHAR,
year VARCHAR
)
|
SELECT no_in_series FROM table_1876825_3 WHERE original_air_date = "February 25, 2001"
|
What episode number in the series originally aired on February 25, 2001?
|
CREATE TABLE table_1876825_3 (no_in_series VARCHAR, original_air_date VARCHAR)
|
SELECT song_name, song_release_year FROM singer ORDER BY age LIMIT 1
|
Show the name and the release year of the song by the youngest singer.
|
CREATE TABLE singer (song_name VARCHAR, song_release_year VARCHAR, age VARCHAR)
|
SELECT date_of_appointment FROM table_name_33 WHERE team = "ac horsens"
|
WHAT IS THE APPOINTMENT DATE FOR AC HORSENS?
|
CREATE TABLE table_name_33 (
date_of_appointment VARCHAR,
team VARCHAR
)
|
SELECT title FROM table_1876825_3 WHERE production_code = "06-00-218"
|
What is the name of the episode with the production code of 06-00-218?
|
CREATE TABLE table_1876825_3 (title VARCHAR, production_code VARCHAR)
|
SELECT DISTINCT country FROM singer WHERE age > 20
|
What are all distinct countries where singers above age 20 are from?
|
CREATE TABLE singer (country VARCHAR, age INTEGER)
|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "16" AND lab.itemid = "50976"
|
what is the number of patients whose days of hospital stay is greater than 16 and item id is 50976?
|
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
)
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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
|
SELECT production_code FROM table_1876825_3 WHERE no_in_series = 26
|
What is the production code for episode 26 in the series?
|
CREATE TABLE table_1876825_3 (production_code VARCHAR, no_in_series VARCHAR)
|
SELECT country, COUNT(*) FROM singer GROUP BY country
|
Show all countries and the number of singers in each country.
|
CREATE TABLE singer (country VARCHAR)
|
SELECT AVG(game) FROM table_name_58 WHERE date = "december 23"
|
What is the average Game, when Date is 'December 23'?
|
CREATE TABLE table_name_58 (
game INTEGER,
date VARCHAR
)
|
SELECT production_code FROM table_1876825_3 WHERE no_in_season = 6
|
What is the production code for episode 6 in the season?
|
CREATE TABLE table_1876825_3 (production_code VARCHAR, no_in_season VARCHAR)
|
SELECT song_name FROM singer WHERE age > (SELECT AVG(age) FROM singer)
|
List all song names by singers above the average age.
|
CREATE TABLE singer (song_name VARCHAR, age INTEGER)
|
SELECT MIN(top_25) FROM table_name_17 WHERE wins > 0
|
What is the fewest number of top-25s for events with more than 0 wins?
|
CREATE TABLE table_name_17 (
top_25 INTEGER,
wins INTEGER
)
|
SELECT title FROM table_1876825_8 WHERE no_in_season = 2
|
what is the title no in season 2?
|
CREATE TABLE table_1876825_8 (title VARCHAR, no_in_season VARCHAR)
|
SELECT LOCATION, name FROM stadium WHERE capacity BETWEEN 5000 AND 10000
|
Show location and name for all stadiums with a capacity between 5000 and 10000.
|
CREATE TABLE stadium (LOCATION VARCHAR, name VARCHAR, capacity INTEGER)
|
SELECT product_name, COUNT(product_name) FROM Products WHERE product_price > 1000 OR product_price < 500 GROUP BY product_name
|
Show the number of products with price higher than 1000 or lower than 500 for each product name in a bar chart.
|
CREATE TABLE Products (
product_id INTEGER,
product_type_code VARCHAR(15),
product_name VARCHAR(80),
product_price DOUBLE
)
CREATE TABLE Customer_Address_History (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(15),
customer_number VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50)
)
CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_date DATETIME,
order_status_code VARCHAR(15)
)
CREATE TABLE Contacts (
contact_id INTEGER,
customer_id INTEGER,
gender VARCHAR(1),
first_name VARCHAR(80),
last_name VARCHAR(50),
contact_phone VARCHAR(80)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(80)
)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.