answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT MAX("Points") FROM table_48148 WHERE "Date" = 'february 10, 2009' AND "Game" > '54' | What game in February 10, 2009 has the most points and a game number larger than 54? | CREATE TABLE table_48148 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Attendance" real,
"Record" text,
"Points" real
) |
SELECT average FROM table_17862135_3 WHERE couple = "Cody & Julianne" | What is average for Cody & Julianne? | CREATE TABLE table_17862135_3 (average VARCHAR, couple VARCHAR) |
SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = "Football" | Show all male student ids who don't play football. | CREATE TABLE Sportsinfo (StuID VARCHAR, sex VARCHAR, sportname VARCHAR); CREATE TABLE Student (StuID VARCHAR, sex VARCHAR, sportname VARCHAR) |
SELECT "Chen Yanqing ( CHN )" FROM table_65306 WHERE "Doha , Qatar" = '—' | What shows for Chen Yanqing (CHN) when Doha, Qatar is ? | CREATE TABLE table_65306 (
"World record" text,
"Snatch" text,
"Chen Yanqing ( CHN )" text,
"111kg" text,
"Doha , Qatar" text
) |
SELECT division_southwest FROM table_17881033_1 WHERE division_south = "Kožuf" AND division_east = "Osogovo" | what is the division southwest when division south was kožuf and division east was osogovo | CREATE TABLE table_17881033_1 (division_southwest VARCHAR, division_south VARCHAR, division_east VARCHAR) |
SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = "David" AND T2.Lname = "Shieber" | Show total hours per week and number of games played for student David Shieber. | CREATE TABLE Student (StuID VARCHAR, Fname VARCHAR, Lname VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR) |
SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY building | What is the average capacity for rooms in each building? Draw a bar chart, and display bars in asc order. | CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
)
CREATE TABLE takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2)
)
CREATE TABLE teaches (
ID var... |
SELECT division_north FROM table_17881033_1 WHERE season = "2007–08" | what is the division north in 2007–08 | CREATE TABLE table_17881033_1 (division_north VARCHAR, season VARCHAR) |
SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20 | Show total hours per week and number of games played for students under 20. | CREATE TABLE Student (StuID VARCHAR, age INTEGER); CREATE TABLE Sportsinfo (StuID VARCHAR) |
SELECT written_by FROM table_25830834_2 WHERE production_code = "2J5153" | Who wrote the episode with the production code 2j5153? | CREATE TABLE table_25830834_2 (
written_by VARCHAR,
production_code VARCHAR
) |
SELECT division_north FROM table_17881033_1 WHERE division_south = "Kožuf" AND division_southwest = "Ilinden Velmej" | what is the division north when division south was kožuf and division southwest was ilinden velmej | CREATE TABLE table_17881033_1 (division_north VARCHAR, division_south VARCHAR, division_southwest VARCHAR) |
SELECT COUNT(DISTINCT StuID) FROM Plays_games | How many students play video games? | CREATE TABLE Plays_games (StuID VARCHAR) |
SELECT "Course" FROM table_57017 WHERE "Date" = '13 may' | What was the course on 13 may? | CREATE TABLE table_57017 (
"Date" text,
"Course" text,
"Distance" text,
"Type" text,
"Winner" text
) |
SELECT COUNT(division_southwest) FROM table_17881033_1 WHERE division_east = "Babi" | how many division southwest was there when division east was babi | CREATE TABLE table_17881033_1 (division_southwest VARCHAR, division_east VARCHAR) |
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games | Show ids of students who don't play video game. | CREATE TABLE Plays_games (StuID VARCHAR); CREATE TABLE Student (StuID VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "8852" | how many patients with private insurance had procedure under icd9 code 8852? | 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 t... |
SELECT division_east FROM table_17881033_1 WHERE division_north = "Milano" | what is the division east when division north was milano | CREATE TABLE table_17881033_1 (division_east VARCHAR, division_north VARCHAR) |
SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games | Show ids of students who play video game and play sports. | CREATE TABLE Plays_games (StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR) |
SELECT "Opponent" FROM table_6974 WHERE "Time" = '3:00' | Who is the opponent of the 3:00 time? | CREATE TABLE table_6974 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Round" real,
"Time" text,
"Location" text
) |
SELECT written_by FROM table_17901155_3 WHERE no_in_season = 3 | who co-wrote Season 2, Episode 3? | CREATE TABLE table_17901155_3 (written_by VARCHAR, no_in_season VARCHAR) |
SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid | Show all game ids and the number of hours played. | CREATE TABLE Plays_games (gameid VARCHAR, hours_played INTEGER) |
SELECT COUNT("Played") FROM table_17813 WHERE "Tries for" = '60' | what amount played tried for 60? | CREATE TABLE table_17813 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) |
SELECT MAX(no_in_series) FROM table_17901155_3 WHERE directed_by = "Kelly Sandefur" | what is the series # for the episode directed by Kelly Sandefur? | CREATE TABLE table_17901155_3 (no_in_series INTEGER, directed_by VARCHAR) |
SELECT Stuid, SUM(hours_played) FROM Plays_games GROUP BY Stuid | Show all student ids and the number of hours played. | CREATE TABLE Plays_games (Stuid VARCHAR, hours_played INTEGER) |
SELECT "name" FROM table_204_125 WHERE id = (SELECT id FROM table_204_125 WHERE "name" = 'kang') - 1 | who was king right before kang ? | CREATE TABLE table_204_125 (
id number,
"state" text,
"type" text,
"name" text,
"title" text,
"royal house" text,
"from" text,
"to" text
) |
SELECT COUNT(prod_code) FROM table_17901155_3 WHERE no_in_series = 32 | how many production codes were there for the episode that was 32 in the series? | CREATE TABLE table_17901155_3 (prod_code VARCHAR, no_in_series VARCHAR) |
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM(hours_played) DESC LIMIT 1 | Show the game name that has most number of hours played. | CREATE TABLE Plays_games (gameid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR) |
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'hemodialysis - for chronic renal failure' AND STRFTI... | retrieve the top five most frequent lab tests that patients took within 2 months after receiving hemodialysis - for chronic renal failure until 2101. | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... |
SELECT year__ceremony_ FROM table_17919342_1 WHERE original_title = "Milagros" | What year was the film Milagros submitted? | CREATE TABLE table_17919342_1 (year__ceremony_ VARCHAR, original_title VARCHAR) |
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING SUM(hours_played) >= 1000 | Show all game names played by at least 1000 hours. | CREATE TABLE Plays_games (gameid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR) |
SELECT "Opponent" FROM table_34784 WHERE "Tournament" = 'leipzig' | Who was the opponent that anke huber played against in the leipzig tournament? | CREATE TABLE table_34784 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) |
SELECT COUNT(year__ceremony_) FROM table_17919342_1 WHERE film_title_used_in_nomination = "The Blossoming of Maximo Oliveros" | How many years was the film The Blossoming of Maximo Oliveros entered? | CREATE TABLE table_17919342_1 (year__ceremony_ VARCHAR, film_title_used_in_nomination VARCHAR) |
SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = "Smith" AND T3.Fname = "Linda" | Show all game names played by Linda Smith | CREATE TABLE Student (Stuid VARCHAR, Lname VARCHAR, Fname VARCHAR); CREATE TABLE Plays_games (gameid VARCHAR, Stuid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR) |
SELECT founded FROM table_2076490_1 WHERE enrollment__2005_ = "963" | What year is the founding year, for the school that had an enrollment in 2005 of 963? | CREATE TABLE table_2076490_1 (
founded VARCHAR,
enrollment__2005_ VARCHAR
) |
SELECT COUNT(director) FROM table_17919342_1 WHERE original_title = "The Moises Padilla Story" | How many directors were there for the film with the original title of The Moises Padilla Story? | CREATE TABLE table_17919342_1 (director VARCHAR, original_title VARCHAR) |
SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Football" OR T1.SportName = "Lacrosse" | Find the last and first name of students who are playing Football or Lacrosse. | CREATE TABLE SportsInfo (StuID VARCHAR, SportName VARCHAR); CREATE TABLE Student (lname VARCHAR, fname VARCHAR, StuID VARCHAR) |
SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "ANGIOEDEMA" AND demographic.age >= "51" | What is the average age of patients whose primary disease is angioedema and age is equal to or more than 51 years? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... |
SELECT spacecraft FROM table_179174_2 WHERE launch_complex = "LC34" | What spacecraft was launched from the LC34 launch complex? | CREATE TABLE table_179174_2 (spacecraft VARCHAR, launch_complex VARCHAR) |
SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse") | Find the first name and age of the students who are playing both Football and Lacrosse. | CREATE TABLE Student (fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR); CREATE TABLE Sportsinfo (fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'atrial fibrilla... | what is the five most frequent drugs that were prescribed in the same hospital visit during this year to the patients of age 40s after having been diagnosed with atrial fibrillation. | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... |
SELECT spacecraft FROM table_179174_2 WHERE flights = "22 Orbital" | What spacecrafts had 22 orbital flights? | CREATE TABLE table_179174_2 (spacecraft VARCHAR, flights VARCHAR) |
SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Works of Widenius") | Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games. | CREATE TABLE Plays_games (StuID VARCHAR, GameID VARCHAR); CREATE TABLE Student (lname VARCHAR, sex VARCHAR, StuID VARCHAR); CREATE TABLE Video_games (GameID VARCHAR, Gname VARCHAR) |
SELECT demographic.admission_location, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "22377" | show me the admission and discharge location of subject id 22377. | 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 t... |
SELECT launcher FROM table_179174_2 WHERE flights = "37 Orbital" | What launcher had spacecrafts that did 37 orbital flights? | CREATE TABLE table_179174_2 (launcher VARCHAR, flights VARCHAR) |
SELECT customer_name FROM customers | Find the name of all customers. | CREATE TABLE customers (customer_name VARCHAR) |
SELECT MAX(year) FROM table_name_63 WHERE game = "call of duty 4: modern warfare" | What is the latest year when Call of Duty 4: Modern Warfare was the game? | CREATE TABLE table_name_63 (
year INTEGER,
game VARCHAR
) |
SELECT years FROM table_179174_2 WHERE flights = "134 Orbital" | What years had 134 orbital flights? | CREATE TABLE table_179174_2 (years VARCHAR, flights VARCHAR) |
SELECT AVG(order_quantity) FROM order_items | What is the average amount of items ordered in each order? | CREATE TABLE order_items (order_quantity INTEGER) |
SELECT DISTINCT flight_id FROM flight WHERE (((departure_time > 1700 AND flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 23 AND DATE_DAYalias0.month_number = 4 AND DATE_DAYa... | i need flight information for flights departing from CLEVELAND to MILWAUKEE on wednesday after 1700 | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE ground_service (
city_code text,
airport_co... |
SELECT status_at_production FROM table_1792122_11 WHERE project = "London Aquatics Centre" | What is the status of the London Aquatics Centre project at the time of production? | CREATE TABLE table_1792122_11 (status_at_production VARCHAR, project VARCHAR) |
SELECT customer_name FROM customers WHERE payment_method = "Cash" | What are the names of customers who use payment method "Cash"? | CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR) |
SELECT COUNT("Lane") FROM table_33013 WHERE "Heat" = '1' AND "Name" = 'david carry' | What lane is David Carry in heat 1? | CREATE TABLE table_33013 (
"Rank" real,
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"100m" real,
"150m" text,
"Time" text
) |
SELECT original_air_date FROM table_1792122_11 WHERE no_in_series = 71 | What was the original are date of series number 71? | CREATE TABLE table_1792122_11 (original_air_date VARCHAR, no_in_series VARCHAR) |
SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20 | Find the "date became customers" of the customers whose ID is between 10 and 20. | CREATE TABLE customers (date_became_customer VARCHAR, customer_id INTEGER) |
SELECT mID, AVG(stars) FROM Rating GROUP BY mID HAVING COUNT(*) >= 2 | Find the average rating star for each movie that received at least 2 ratings. | CREATE TABLE Rating (
mID VARCHAR,
stars INTEGER
) |
SELECT length FROM table_17918238_1 WHERE maximum_diameter = "450 mm" | What is the length for a diameter totaling 450 mm? | CREATE TABLE table_17918238_1 (length VARCHAR, maximum_diameter VARCHAR) |
SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1 | Which payment method is used by most customers? | CREATE TABLE customers (payment_method VARCHAR) |
SELECT aggregate_score FROM table_27986200_3 WHERE proceed_to_quarter_final = "Montauban" | What was the aggregate score for Montauban? | CREATE TABLE table_27986200_3 (
aggregate_score VARCHAR,
proceed_to_quarter_final VARCHAR
) |
SELECT maximum_diameter FROM table_17918238_1 WHERE owner_operator = "Esperance Pipeline Co" | What is Esperance pipeline co total diameter? | CREATE TABLE table_17918238_1 (maximum_diameter VARCHAR, owner_operator VARCHAR) |
SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1) | What are the names of customers using the most popular payment method? | CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR) |
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cellulitis - extremity' AND DATETIME(diagnosis.diagnosistime, 'start of y... | the previous year, how many patients were prescribed with lopressor in the same hospital visit after having been diagnosed with cellulitis - extremity? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TAB... |
SELECT opponent FROM table_17924362_1 WHERE date = "December 8" | Name the opponent for december 8 | CREATE TABLE table_17924362_1 (opponent VARCHAR, date VARCHAR) |
SELECT DISTINCT payment_method FROM customers | What are all the payment methods? | CREATE TABLE customers (payment_method VARCHAR) |
SELECT "Genre" FROM table_14156 WHERE "Developer(s)" = 'naughty dog' | Which Genre has a Developer(s) of naughty dog? | CREATE TABLE table_14156 (
"Year" real,
"Game" text,
"Genre" text,
"Platform(s)" text,
"Developer(s)" text
) |
SELECT COUNT(week) FROM table_17924362_1 WHERE date = "October 26" | Name the number of weeks for october 26 | CREATE TABLE table_17924362_1 (week VARCHAR, date VARCHAR) |
SELECT DISTINCT product_details FROM products | What are the details of all products? | CREATE TABLE products (product_details VARCHAR) |
SELECT "Result" FROM table_46493 WHERE "Week" = '11' | What was the result of week 11? | CREATE TABLE table_46493 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"TV Time" text
) |
SELECT COUNT(attendance) FROM table_17928023_1 WHERE week = 6 | What is the attendance record for week 6? | CREATE TABLE table_17928023_1 (attendance VARCHAR, week VARCHAR) |
SELECT customer_name FROM customers WHERE customer_name LIKE "%Alex%" | Find the name of all customers whose name contains "Alex". | CREATE TABLE customers (customer_name VARCHAR) |
SELECT gt2_winning_team FROM table_19598014_2 WHERE lmp2_winning_team = "Butch Leitzinger Marino Franchitti Ben Devlin" | Name the gt2 winning team where lmp2 winning team and butch leitzinger marino franchitti ben devlin | CREATE TABLE table_19598014_2 (
gt2_winning_team VARCHAR,
lmp2_winning_team VARCHAR
) |
SELECT result FROM table_17928023_1 WHERE game_site = "Schaefer Stadium" | For game site Schaefer Stadium, what were the results? | CREATE TABLE table_17928023_1 (result VARCHAR, game_site VARCHAR) |
SELECT product_details FROM products WHERE product_details LIKE "%Latte%" OR product_details LIKE "%Americano%" | Find the detail of products whose detail contains the word "Latte" or the word "Americano" | CREATE TABLE products (product_details VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND demographic.admityear < "2187" | how many patients discharged to psychiatric facility-partial hospitalization were admitted to hospital before 2187? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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
)
C... |
SELECT outgoing_manage FROM table_17933600_2 WHERE incoming_manager = "João Pereira" | Who was the outgoing manager when the incoming manager was joão pereira? | CREATE TABLE table_17933600_2 (outgoing_manage VARCHAR, incoming_manager VARCHAR) |
SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = "Maudie Kertzmann" | What is the address content of the customer named "Maudie Kertzmann"? | CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (address_content VARCHAR, address_id VARCHAR) |
SELECT opponent FROM table_name_8 WHERE event = "king of the cage: shock and awe" | Which Opponent has an Event of king of the cage: shock and awe? | CREATE TABLE table_name_8 (
opponent VARCHAR,
event VARCHAR
) |
SELECT team FROM table_17933600_2 WHERE outgoing_manage = "João Alves" | What team(s) had an outgoing manager of joão alves? | CREATE TABLE table_17933600_2 (team VARCHAR, outgoing_manage VARCHAR) |
SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = "Lake Geovannyton" | How many customers are living in city "Lake Geovannyton"? | CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, city VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR) |
SELECT "Directed by" FROM table_73199 WHERE "Television order" = 'S01E13' | who directed s01e13 | CREATE TABLE table_73199 (
"No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"Television order" text
) |
SELECT date_of_vacancy FROM table_17933600_2 WHERE outgoing_manage = "Bogićević" | What day did the job open up when bogićević was outgoing? | CREATE TABLE table_17933600_2 (date_of_vacancy VARCHAR, outgoing_manage VARCHAR) |
SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = "Colorado" | Find the name of customers who are living in Colorado? | CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR) |
SELECT Name, MIN(Price) FROM Products GROUP BY Name ORDER BY MIN(Price) | Show the name of the product that is cheapest in each product category with their minimum price with a bar graph, and sort by the y-axis in asc. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) |
SELECT 0 AS _100km_h, s FROM table_17941111_2 WHERE name = "2.0 8v" | Name the 0-100 km/hs for name of 2.0 8v | CREATE TABLE table_17941111_2 (s VARCHAR, name VARCHAR) |
SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id) | Find the list of cities that no customer is living in. | CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (city VARCHAR) |
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax" | Find the number of characteristics that the product 'flax' has. | CREATE TABLE product_characteristics (
product_id number,
characteristic_id number,
product_characteristic_value text
)
CREATE TABLE characteristics (
characteristic_id number,
characteristic_type_code text,
characteristic_data_type text,
characteristic_name text,
other_characteristic_d... |
SELECT volume FROM table_17941111_2 WHERE co_2 = "168 g/km" | Name the volume for co 2 for 168 g/km | CREATE TABLE table_17941111_2 (volume VARCHAR, co_2 VARCHAR) |
SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1 | Which city has the most customers living in? | CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR) |
SELECT "date" FROM table_203_538 ORDER BY "date" LIMIT 1 | what was the earliest date of a flight ? | CREATE TABLE table_203_538 (
id number,
"flight" text,
"date" text,
"payload nickname" text,
"payload" text,
"orbit" text,
"result" text
) |
SELECT tries_for FROM table_17941032_1 WHERE tries_against = "60" | When 60 is the tries against what is the tries for? | CREATE TABLE table_17941032_1 (tries_for VARCHAR, tries_against VARCHAR) |
SELECT city FROM addresses WHERE zip_postcode = 255 | Find the city with post code 255. | CREATE TABLE addresses (city VARCHAR, zip_postcode VARCHAR) |
SELECT MAX("#") FROM table_20630 WHERE "Opponent" = 'New England Blazers' | Name the most number for new england blazers | CREATE TABLE table_20630 (
"#" real,
"Date" text,
"at/vs." text,
"Opponent" text,
"Score" text,
"Attendance" real,
"Record" text
) |
SELECT lost FROM table_17941032_1 WHERE tries_for = "22" | When 22 is the tries for what is the lost? | CREATE TABLE table_17941032_1 (lost VARCHAR, tries_for VARCHAR) |
SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE "4%" | Find the state and country of all cities with post code starting with 4. | CREATE TABLE addresses (state_province_county VARCHAR, country VARCHAR, zip_postcode VARCHAR) |
SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 8 AND program_course.category LIKE 'ULCS' | 8 credit upper-level classes number how many ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
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... |
SELECT club FROM table_17941032_1 WHERE points = "98" | When 98 is the points what is the club? | CREATE TABLE table_17941032_1 (club VARCHAR, points VARCHAR) |
SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4 | List the countries having more than 4 addresses listed. | CREATE TABLE addresses (country VARCHAR, address_id VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NEWARK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON'... | flights from NEWARK to BOSTON | CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service... |
SELECT try_bonus FROM table_17941032_1 WHERE tries_for = "80" | When 80 is the tries for what is the try bonus? | CREATE TABLE table_17941032_1 (try_bonus VARCHAR, tries_for VARCHAR) |
SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5 | List all the contact channel codes that were used less than 5 times. | CREATE TABLE customer_contact_channels (channel_code VARCHAR, customer_id VARCHAR) |
SELECT AVG("Number of electorates (2009)") FROM table_12609 WHERE "Name" = 'hingna' | What is the number of electorates (2009) for Hingna? | CREATE TABLE table_12609 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.