answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT record FROM table_17080868_8 WHERE high_points = "Corey Maggette (25)" | All high points were record by corey maggette (25). | CREATE TABLE table_17080868_8 (record VARCHAR, high_points VARCHAR) |
SELECT AVG(International_Passengers) FROM airport | What is the average number of international passengers of all airports? | CREATE TABLE airport (International_Passengers INTEGER) |
SELECT u.Location, u.Id, u.Reputation FROM Users AS u WHERE u.Location = 'Cheyenne, WY' | Where do Stack Overflow users come from?. | CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
... |
SELECT COUNT(location_attendance) FROM table_17080868_6 WHERE date = "December 29" | what is the total number of attendance where the date is december 29? | CREATE TABLE table_17080868_6 (location_attendance VARCHAR, date VARCHAR) |
SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = "London Heathrow" | What are the number of international and domestic passengers of the airport named London "Heathrow"? | CREATE TABLE airport (International_Passengers VARCHAR, Domestic_Passengers VARCHAR, Airport_Name VARCHAR) |
SELECT "Date" FROM table_11174 WHERE "Result" = '8–2' AND "Score" = '6–2' | What is the Date with a Result of 8 2, and a Score with 6 2? | CREATE TABLE table_11174 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) |
SELECT manner_of_departure FROM table_17085981_2 WHERE outgoing_manager = "Petrik Sander" | What was the manner in which Petrik Sander departed? | CREATE TABLE table_17085981_2 (manner_of_departure VARCHAR, outgoing_manager VARCHAR) |
SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%" | What are the total number of Domestic Passengers of airports that contain the word "London". | CREATE TABLE airport (Domestic_Passengers INTEGER, Airport_Name VARCHAR) |
SELECT "left office" FROM table_204_668 ORDER BY id DESC LIMIT 1 | what was the date the last person on the list left office ? | CREATE TABLE table_204_668 (
id number,
"#" number,
"menteri besar" text,
"took office" text,
"left office" text,
"party" text
) |
SELECT manner_of_departure FROM table_17085981_2 WHERE team = "Stuttgarter Kickers" AND outgoing_manager = "Edgar Schmitt" | What was the manner of departure for Edgar Schmitt of the Stuttgarter Kickers? | CREATE TABLE table_17085981_2 (manner_of_departure VARCHAR, team VARCHAR, outgoing_manager VARCHAR) |
SELECT MAX(Transit_Passengers), MIN(Transit_Passengers) FROM airport | What are the maximum and minimum number of transit passengers of all aiports. | CREATE TABLE airport (Transit_Passengers INTEGER) |
SELECT COUNT("Round of 16") FROM table_28578 WHERE "Round of 32" = 'Lakpa Tashi Sherpa ( BHU ) W PTS 12-5' | How many times was lakpa tashi sherpa ( bhu ) w pts 12-5 in round of 32? | CREATE TABLE table_28578 (
"Athlete" text,
"Event" text,
"Round of 32" text,
"Round of 16" text,
"Quarterfinals" text,
"Semifinals" text
) |
SELECT date_of_appointment FROM table_17085981_2 WHERE outgoing_manager = "Jürgen Kohler" | What was the date of appointment when Jürgen Kohler was the outgoing manager? | CREATE TABLE table_17085981_2 (date_of_appointment VARCHAR, outgoing_manager VARCHAR) |
SELECT Name FROM pilot WHERE Age >= 25 | What are the name of pilots aged 25 or older? | CREATE TABLE pilot (Name VARCHAR, Age VARCHAR) |
SELECT "competition" FROM table_204_975 GROUP BY "competition" HAVING COUNT("event") = 1 | which competition took place in 2008 but had only one event ? | CREATE TABLE table_204_975 (
id number,
"year" number,
"competition" text,
"location" text,
"event" text,
"final-rank" text,
"final-score" number,
"qualifying rank" number,
"qualifying score" number
) |
SELECT COUNT(date_of_appointment) FROM table_17085981_2 WHERE replaced_by = "Jürgen Kohler" | How many appointment dates were recorded when Jürgen Kohler was the replaced by? | CREATE TABLE table_17085981_2 (date_of_appointment VARCHAR, replaced_by VARCHAR) |
SELECT Name FROM pilot ORDER BY Name | List all pilot names in ascending alphabetical order. | CREATE TABLE pilot (Name VARCHAR) |
SELECT "Competition" FROM table_75507 WHERE "Away result" = '0–3' AND "Season" = '1969-70' | Away result of 0 3, and a Season of 1969-70 is what competition? | CREATE TABLE table_75507 (
"Season" text,
"Competition" text,
"Round" text,
"Club" text,
"Home result" text,
"Away result" text
) |
SELECT swimsuit FROM table_17088705_2 WHERE interview = "9.366" | What are the swimsuit scores of participants with score 9.366 in interview | CREATE TABLE table_17088705_2 (swimsuit VARCHAR, interview VARCHAR) |
SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC | List names of all pilot aged 30 or younger in descending alphabetical order. | CREATE TABLE pilot (Name VARCHAR, Age VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND lab.label = "Total Protein, Urine" | out of total number of patients who had a lab test for total protein in urine, how many of them belonged to christian scientist belief? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... |
SELECT average FROM table_17088705_2 WHERE country = "Arizona" | State average scores of participants from arizona | CREATE TABLE table_17088705_2 (average VARCHAR, country VARCHAR) |
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick" | Please show the names of aircrafts associated with airport with name "London Gatwick". | CREATE TABLE airport (Airport_ID VARCHAR, Airport_Name VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR) |
SELECT COUNT("team") FROM table_203_450 WHERE "manner of departure" = 'contract terminated' | how many teams had a manner of departure due to there contract being terminated ? | CREATE TABLE table_203_450 (
id number,
"team" text,
"outgoing manager" text,
"manner of departure" text,
"date of vacancy" text,
"replaced by" text,
"date of appointment" text,
"position in table" text
) |
SELECT COUNT(interview) FROM table_17088705_2 WHERE preliminary = "8.895" | Number of participants with a score 8.895 in preliminary | CREATE TABLE table_17088705_2 (interview VARCHAR, preliminary VARCHAR) |
SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000 | Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000. | CREATE TABLE airport (Airport_ID VARCHAR, Total_Passengers INTEGER); CREATE TABLE aircraft (Aircraft VARCHAR, Description VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR) |
SELECT MIN(age), AVG(age), MAX(age) FROM Student | Show the minimum, average, and maximum age of all students. | CREATE TABLE Student (
age INTEGER
) |
SELECT evening_gown FROM table_17088705_2 WHERE swimsuit = "8.988" | Evening gown scores of participants with 8.988 swimsuit score | CREATE TABLE table_17088705_2 (evening_gown VARCHAR, swimsuit VARCHAR) |
SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22" | What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"? | CREATE TABLE airport (Total_Passengers INTEGER, Airport_ID VARCHAR); CREATE TABLE aircraft (Aircraft_ID VARCHAR, Aircraft VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR) |
SELECT "Saturday Shani (Saturn)" FROM table_17783 WHERE "Sunday Surya (the Sun)" = 'ஞாயிற்று கிழமை Nyāyitru kizhamai' | In the system where Sunday is ny yitru kizhamai, what is Saturday? | CREATE TABLE table_17783 (
"Day" text,
"Sunday Surya (the Sun)" text,
"Monday Soma (the Moon)" text,
"Tuesday Mangala (Mars)" text,
"Wednesday Budha (Mercury)" text,
"Thursday Guru (Jupiter)" text,
"Friday Shukra (Venus)" text,
"Saturday Shani (Saturn)" text
) |
SELECT average FROM table_17088705_2 WHERE evening_gown = "9.226" | What are the average scores of participants with 9.226 in evening gown | CREATE TABLE table_17088705_2 (average VARCHAR, evening_gown VARCHAR) |
SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft | Please list the location and the winning aircraft name. | CREATE TABLE MATCH (Location VARCHAR, Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR) |
SELECT AVG(gold) FROM table_name_13 WHERE rank = "17" AND silver > 4 | What is the average number of golds for teams in rank 17 with more than 4 silver? | CREATE TABLE table_name_13 (
gold INTEGER,
rank VARCHAR,
silver VARCHAR
) |
SELECT swimsuit FROM table_17088705_2 WHERE preliminary = "8.847" | Give swimsuit scores of participants 8.847 in preliminary | CREATE TABLE table_17088705_2 (swimsuit VARCHAR, preliminary VARCHAR) |
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1 | List the name of the aircraft that has been named winning aircraft the most number of times. | CREATE TABLE MATCH (Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR) |
SELECT MAX(pick) FROM table_name_30 WHERE player = "lonnie brockman" AND round < 9 | What was the highest Pick for Lonnie Brockman before round 9? | CREATE TABLE table_name_30 (
pick INTEGER,
player VARCHAR,
round VARCHAR
) |
SELECT official_name FROM table_170958_2 WHERE area_km_2 = "276.84" | What is the official name of the land with an area of 276.84 km2? | CREATE TABLE table_170958_2 (official_name VARCHAR, area_km_2 VARCHAR) |
SELECT T1.Aircraft, COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft | List the names of aircrafts and the number of times it won matches. | CREATE TABLE MATCH (Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR) |
SELECT AVG("Played") FROM table_42627 WHERE "Points" > '14' AND "Against" > '17' | How many average plays have points greater than 14, with an against greater than 17? | CREATE TABLE table_42627 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) |
SELECT COUNT(population) FROM table_170958_2 WHERE area_km_2 = "149.32" | What is the total number of population in the land with an area of 149.32 km2? | CREATE TABLE table_170958_2 (population VARCHAR, area_km_2 VARCHAR) |
SELECT Name FROM pilot ORDER BY Age DESC | List names of all pilot in descending order of age. | CREATE TABLE pilot (Name VARCHAR, Age VARCHAR) |
SELECT DISTINCT location FROM track | What are distinct locations where tracks are located? | CREATE TABLE race (
race_id number,
name text,
class text,
date text,
track_id text
)
CREATE TABLE track (
track_id number,
name text,
location text,
seating number,
year_opened number
) |
SELECT MAX(population) FROM table_170958_2 WHERE area_km_2 = "276.84" | What is the maximum population of the land with an area of 276.84 km2? | CREATE TABLE table_170958_2 (population INTEGER, area_km_2 VARCHAR) |
SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2 | List the names of aircrafts and that won matches at least twice. | CREATE TABLE MATCH (Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR) |
SELECT "Attendance" FROM table_57043 WHERE "Loss" = 'wakefield (7–10)' | What was the attendance at the Red Sox game that had a loss of Wakefield (7 10)? | CREATE TABLE table_57043 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) |
SELECT area_km_2 FROM table_170958_2 WHERE official_name = "Hopewell" | What is the land area of Hopewell parish in km2? | CREATE TABLE table_170958_2 (area_km_2 VARCHAR, official_name VARCHAR) |
SELECT Aircraft FROM aircraft WHERE NOT Aircraft_ID IN (SELECT Winning_Aircraft FROM MATCH) | List the names of aircrafts and that did not win any match. | CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR, Winning_Aircraft VARCHAR); CREATE TABLE MATCH (Aircraft VARCHAR, Aircraft_ID VARCHAR, Winning_Aircraft VARCHAR) |
SELECT "Deceased Spouse" FROM table_26633 WHERE "Length of Marriage" = '4 years' | Who was the deceased spouse who was married for 4 years? | CREATE TABLE table_26633 (
"Name" text,
"Deceased Spouse" text,
"Cause of Death" text,
"Date of Spouses Death" text,
"Length of Marriage" text,
"Children Together" text,
"Current Marital Status" text
) |
SELECT march_27_29 FROM table_1708610_3 WHERE november_3 = "133" | Name the march 27-29 for november 3 being 133 | CREATE TABLE table_1708610_3 (march_27_29 VARCHAR, november_3 VARCHAR) |
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport... | Show the names of aircrafts that are associated with both an airport named "London Heathrow" and an airport named "London Gatwick" | CREATE TABLE airport (Airport_ID VARCHAR, Airport_Name VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR) |
SELECT campus FROM campuses WHERE year = 1958 | What are the campuses that opened in 1958? | CREATE TABLE degrees (
year number,
campus number,
degrees number
)
CREATE TABLE discipline_enrollments (
campus number,
discipline number,
year number,
undergraduate number,
graduate number
)
CREATE TABLE enrollments (
campus number,
year number,
totalenrollment_ay number,... |
SELECT march_27_29 FROM table_1708610_3 WHERE january_15_16 = "January 15, 1991" | Name march 27-29 where january 15-16 is january 15, 1991 | CREATE TABLE table_1708610_3 (march_27_29 VARCHAR, january_15_16 VARCHAR) |
SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1 | Show all information on the airport that has the largest number of international passengers. | CREATE TABLE airport (International_Passengers VARCHAR) |
SELECT site FROM table_1601792_4 WHERE television_station = "TV3" | What site(s) for tv station tv3? | CREATE TABLE table_1601792_4 (
site VARCHAR,
television_station VARCHAR
) |
SELECT january_15_16 FROM table_1708610_3 WHERE march_27_29 = "March 29, 2006" | Name the january 15-16 where march 27-29 where march 29, 2006 | CREATE TABLE table_1708610_3 (january_15_16 VARCHAR, march_27_29 VARCHAR) |
SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1 | find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. | CREATE TABLE MATCH (winning_pilot VARCHAR); CREATE TABLE pilot (name VARCHAR, age INTEGER, pilot_id VARCHAR) |
SELECT name FROM table_name_30 WHERE year = "1957" | What actor made a film in 1957? | CREATE TABLE table_name_30 (
name VARCHAR,
year VARCHAR
) |
SELECT COUNT(location_attendance) FROM table_17102076_10 WHERE score = "L 141–143 (OT)" | Name the number of location attendance for l 141–143 (ot) | CREATE TABLE table_17102076_10 (location_attendance VARCHAR, score VARCHAR) |
SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1 | what is the name and age of the youngest winning pilot? | CREATE TABLE pilot (name VARCHAR, age VARCHAR, pilot_id VARCHAR); CREATE TABLE MATCH (winning_pilot VARCHAR) |
SELECT All_Home, SUM(School_ID) FROM basketball_match GROUP BY All_Home | Return a pie chart about the proportion of All_Home and the sum of School_ID. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... |
SELECT record FROM table_17102076_10 WHERE date = "April 1" | Name the record for april 1 | CREATE TABLE table_17102076_10 (record VARCHAR, date VARCHAR) |
SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia') | find the name of pilots who did not win the matches held in the country of Australia. | CREATE TABLE MATCH (name VARCHAR, pilot_id VARCHAR, Winning_Pilot VARCHAR, country VARCHAR); CREATE TABLE pilot (name VARCHAR, pilot_id VARCHAR, Winning_Pilot VARCHAR, country VARCHAR) |
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr... | Is there a professor assigned to teach Other classes next Winter ? | CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
sc... |
SELECT high_assists FROM table_17102076_10 WHERE score = "L 98–118 (OT)" | Name the high assists for score being l 98–118 (ot) | CREATE TABLE table_17102076_10 (high_assists VARCHAR, score VARCHAR) |
SELECT T1.property_id, COUNT(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id | How many residents does each property have? List property id and resident count. | CREATE TABLE properties (property_id VARCHAR); CREATE TABLE residents (property_id VARCHAR) |
SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown' | What is the total balance of savings accounts not belonging to someone with the name Brown? | CREATE TABLE checking (
custid number,
balance number
)
CREATE TABLE savings (
custid number,
balance number
)
CREATE TABLE accounts (
custid number,
name text
) |
SELECT MIN(game) FROM table_17102076_10 WHERE location_attendance = "ARCO Arena 13,330" | Name the least game for arco arena 13,330 | CREATE TABLE table_17102076_10 (game INTEGER, location_attendance VARCHAR) |
SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party' | What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'? | CREATE TABLE services (service_type_code VARCHAR, organization_id VARCHAR); CREATE TABLE organizations (organization_id VARCHAR, organization_details VARCHAR) |
SELECT p.Id, COUNT(pht.Name) FROM Posts AS p, PostTypes AS pt, PostHistoryTypes AS pht, PostHistory AS ph WHERE p.Id = ph.PostId AND ph.PostHistoryTypeId = pht.Id AND p.PostTypeId = pt.Id AND pt.Name = 'Question' AND pht.Id IN (17, 35, 36) GROUP BY p.Id ORDER BY p.Id | Migrated questions to posted questions ratio. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... |
SELECT high_rebounds FROM table_17102076_5 WHERE game = 11 | Name the high rebounds for game 11 | CREATE TABLE table_17102076_5 (high_rebounds VARCHAR, game VARCHAR) |
SELECT T1.resident_id, T1.other_details, COUNT(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY COUNT(*) DESC | How many services has each resident requested? List the resident id, details, and the count in descending order of the count. | CREATE TABLE Residents_Services (resident_id VARCHAR); CREATE TABLE Residents (resident_id VARCHAR, other_details VARCHAR) |
SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank | Show the number of faculty for each rank in a bar chart. | CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Faculty_Participates_in (
Fac... |
SELECT high_points FROM table_17102076_5 WHERE score = "L 92–100 (OT)" | Name the high points for score being l 92–100 (ot) | CREATE TABLE table_17102076_5 (high_points VARCHAR, score VARCHAR) |
SELECT T1.service_id, T1.service_details, COUNT(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY COUNT(*) DESC LIMIT 1 | What is the maximum number that a certain service is provided? List the service id, details and number. | CREATE TABLE Services (service_id VARCHAR, service_details VARCHAR); CREATE TABLE Residents_Services (service_id VARCHAR) |
SELECT MIN(crowd) FROM table_name_83 WHERE away_team = "melbourne" | What was the smallest crowd for a Melbourne away game? | CREATE TABLE table_name_83 (
crowd INTEGER,
away_team VARCHAR
) |
SELECT team FROM table_17102076_5 WHERE location_attendance = "ARCO Arena 13,685" | Name the team for arco arena 13,685 | CREATE TABLE table_17102076_5 (team VARCHAR, location_attendance VARCHAR) |
SELECT T1.thing_id, T1.type_of_Thing_Code, T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id | List the id and type of each thing, and the details of the organization that owns it. | CREATE TABLE Organizations (organization_details VARCHAR, organization_id VARCHAR); CREATE TABLE Things (thing_id VARCHAR, type_of_Thing_Code VARCHAR, organization_id VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Ej Westlake%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offer... | What classes does Prof. Ej Westlake teach in Spring 2005 ? | CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname var... |
SELECT score FROM table_17102076_7 WHERE game = 35 | What was the score of game 35? | CREATE TABLE table_17102076_7 (score VARCHAR, game VARCHAR) |
SELECT T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) >= 3 | What are the id and details of the customers who have at least 3 events? | CREATE TABLE Customers (customer_id VARCHAR, customer_details VARCHAR); CREATE TABLE Customer_Events (customer_id VARCHAR) |
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-49375')) AND intakeoutput.cellpath LIKE '%intake%... | when did patient 017-49375 had the first intake on 04/14/this year? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid numb... |
SELECT location_attendance FROM table_17103645_10 WHERE score = "65-72" | Name the location attendance for score of 65-72 | CREATE TABLE table_17103645_10 (location_attendance VARCHAR, score VARCHAR) |
SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id | What is each customer's move in date, and the corresponding customer id and details? | CREATE TABLE Customer_Events (date_moved_in VARCHAR, customer_id VARCHAR); CREATE TABLE Customers (customer_id VARCHAR, customer_details VARCHAR) |
SELECT MIN(catches) FROM table_26041144_16 WHERE player = "Hashan Tillakaratne" | If the player is Hashan Tillakaratne, what is the catches minimum? | CREATE TABLE table_26041144_16 (
catches INTEGER,
player VARCHAR
) |
SELECT record FROM table_17103645_10 WHERE date = "July 18" | Name the record for july 18 | CREATE TABLE table_17103645_10 (record VARCHAR, date VARCHAR) |
SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING COUNT(*) BETWEEN 1 AND 3 | Which events have the number of notes between one and three? List the event id and the property id. | CREATE TABLE Customer_Events (Customer_Event_ID VARCHAR, property_id VARCHAR, customer_event_id VARCHAR); CREATE TABLE Customer_Event_Notes (Customer_Event_ID VARCHAR) |
SELECT "Outcome" FROM table_50160 WHERE "Partner" = 'andoni vivanco' | What is the Outcome of the match with Partner Andoni Vivanco? | CREATE TABLE table_50160 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) |
SELECT COUNT(high_assists) FROM table_17103645_10 WHERE date = "July 1" | Name the number of high assists for july 1 | CREATE TABLE table_17103645_10 (high_assists VARCHAR, date VARCHAR) |
SELECT DISTINCT T2.thing_id, T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21' | What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21' | CREATE TABLE Timed_Status_of_Things (thing_id VARCHAR, Status_of_Thing_Code VARCHAR, Date_and_Date VARCHAR); CREATE TABLE Things (thing_id VARCHAR, Type_of_Thing_Code VARCHAR) |
SELECT DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS "week", COUNT(DISTINCT Posts.Id) AS Posts, COUNT(Posts.AcceptedAnswerId) * 100 / COUNT(DISTINCT Posts.Id) AS PercentWithAcceptedAnswer, SUM(Posts.AnswerCount) AS Answers, SUM(Posts.CommentCount) AS Comments FROM Posts INNER JOIN PostTags O... | Count of questions, comments, answers with tag over time. | CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number... |
SELECT score FROM table_17103645_10 WHERE game = 19 | Name the score when game is 19 | CREATE TABLE table_17103645_10 (score VARCHAR, game VARCHAR) |
SELECT COUNT(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied' | How many distinct locations have the things with service detail 'Unsatisfied' been located in? | CREATE TABLE Timed_Locations_of_Things (Location_Code VARCHAR, thing_id VARCHAR); CREATE TABLE Things (thing_id VARCHAR, service_details VARCHAR) |
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'SEATTLE' AND ground_service.city_code = city.city_code | i need ground transportation in SEATTLE | CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,... |
SELECT result FROM table_17103566_1 WHERE team_1 = "ICL Pakistan" | What is the result when team 1 is ICL Pakistan? | CREATE TABLE table_17103566_1 (result VARCHAR, team_1 VARCHAR) |
SELECT COUNT(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things | How many different status codes of things are there? | CREATE TABLE Timed_Status_of_Things (Status_of_Thing_Code VARCHAR) |
SELECT YEAR(Posts.ClosedDate) AS y, MONTH(Posts.ClosedDate) AS m, CAST(YEAR(Posts.ClosedDate) AS TEXT(10)) + '/' + CAST(MONTH(Posts.ClosedDate) AS TEXT(19)) AS ym, COUNT(CONCAT('http://programmers.stackexchange.com/q/', Posts.Id)) AS Questions FROM PostHistory JOIN Posts ON Posts.Id = PostHistory.PostId WHERE Posts.Clo... | posts closed in sep, oct, or nov, with reasons. | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Tags (
Id number,
TagName text,
C... |
SELECT match_number FROM table_17103566_1 WHERE result = "ICL World by 8 wickets" | What is the match number where the result is ICL World by 8 wickets? | CREATE TABLE table_17103566_1 (match_number VARCHAR, result VARCHAR) |
SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations | Which organizations are not a parent organization of others? List the organization id. | CREATE TABLE organizations (organization_id VARCHAR, parent_organization_id VARCHAR) |
SELECT "Arrival" FROM table_19516 WHERE "Station Code" = 'AWY' | what is the arrival time where the station code is awy? | CREATE TABLE table_19516 (
"No." real,
"Station Code" text,
"Station" text,
"Arrival" text,
"Departure" text,
"Kilometers" real,
"Day" real
) |
SELECT team_2 FROM table_17103566_1 WHERE result = "ICL World by 8 wickets" | What is team 2 where the result is ICL world by 8 wickets? | CREATE TABLE table_17103566_1 (team_2 VARCHAR, result VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.