answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON... | What are the names of the tourist attractions that have parking or shopping as their feature details? | CREATE TABLE Tourist_Attraction_Features (tourist_attraction_id VARCHAR, Feature_ID VARCHAR); CREATE TABLE Features (Feature_ID VARCHAR, feature_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, tourist_attraction_id VARCHAR) |
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-77687') AND treatment.treatme... | what drug was prescribed to patient 005-77687 within the same day after having undergone the oral diuretic - metolazone (zaroxolyn) in a month before? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... |
SELECT COUNT(roleplay) FROM table_17827271_1 WHERE flatspin = "Tracy Taylor" | How many RolePlay actors played the same role as FlatSpin's Tracy Taylor? | CREATE TABLE table_17827271_1 (roleplay VARCHAR, flatspin VARCHAR) |
SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "254 Ottilie Junction" OR T2.How_to_Get_There = "bus" | What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction? | CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE Locations (Location_ID VARCHAR, Address VARCHAR) |
SELECT Date_of_Birth, Weight FROM people ORDER BY Weight DESC | Show weight from each date of birth, and display in descending by the total number. | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... |
SELECT roleplay FROM table_17827271_1 WHERE actor_in_original_production = "Alison Pargeter" | What RolePlay actor played the same role Alison Pargeter played in the original production? | CREATE TABLE table_17827271_1 (roleplay VARCHAR, actor_in_original_production VARCHAR) |
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_At... | What are the names of the tourist attractions Vincent and Marcelle visit? | CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_Details VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) |
SELECT TIME_TO_STR(CreationDate, '%y') * 100 + TIME_TO_STR(CreationDate, '%M') AS yyyymm, COUNT(*) AS cnt FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = 'systemc' GROUP BY TIME_TO_STR(CreationDate, '%y') * 100 + TIME_TO_STR(CreationDate, '%M') ORD... | Queries for systemc over time. | CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostHistory (
Id number,
... |
SELECT church_name FROM table_178381_1 WHERE location_of_the_church = "Stavang" | What's the name of the church in Stavang? | CREATE TABLE table_178381_1 (church_name VARCHAR, location_of_the_church VARCHAR) |
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attrac... | What are the names of tourist attraction that Alison visited but Rosalind did not visit? | CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_Details VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) |
SELECT "Model" FROM table_55048 WHERE "Status" = 'operating' AND "Name" = 'thor''s hammer' | What is the model for Thor's Hammer which is listed as operating? | CREATE TABLE table_55048 (
"Name" text,
"Model" text,
"Park" text,
"Opened" text,
"Status" text
) |
SELECT sub_parish__sokn_ FROM table_178381_1 WHERE location_of_the_church = "Eikefjord" | What's the sub-parish (sokn) of Eikefjord? | CREATE TABLE table_178381_1 (sub_parish__sokn_ VARCHAR, location_of_the_church VARCHAR) |
SELECT COUNT(*) FROM Visitors WHERE NOT Tourist_ID IN (SELECT Tourist_ID FROM Visits) | How many tourists did not make any visit? | CREATE TABLE Visitors (Tourist_ID VARCHAR); CREATE TABLE Visits (Tourist_ID VARCHAR) |
SELECT total_trips__am_pm_ FROM table_name_47 WHERE operated_by = "atlantic coast charters" | What trips are operated by Atlantic coast charters? | CREATE TABLE table_name_47 (
total_trips__am_pm_ VARCHAR,
operated_by VARCHAR
) |
SELECT COUNT(location_of_the_church) FROM table_178381_1 WHERE year_built = "1957" AND church_name = "Askrova bedehuskapell" | On how many locations is there a church named Askrova Bedehuskapell, built in 1957? | CREATE TABLE table_178381_1 (location_of_the_church VARCHAR, year_built VARCHAR, church_name VARCHAR) |
SELECT COUNT(*) FROM Video_games | How many video games exist? | CREATE TABLE Video_games (Id VARCHAR) |
SELECT COUNT("Incumbent") FROM table_72391 WHERE "District" = 'Georgia 6' | How many incumbents were for district georgia 6? | CREATE TABLE table_72391 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) |
SELECT parish__prestegjeld_ FROM table_178381_1 WHERE church_name = "Askrova bedehuskapell" | In what parish is the Askrova Bedehuskapell church? | CREATE TABLE table_178381_1 (parish__prestegjeld_ VARCHAR, church_name VARCHAR) |
SELECT COUNT(DISTINCT gtype) FROM Video_games | How many video game types exist? | CREATE TABLE Video_games (gtype VARCHAR) |
SELECT grid FROM table_name_65 WHERE manufacturer = "yamaha" AND time_retired = "+19.435" | What is the grid with a yamaha manufacturer and a +19.435 time/retired? | CREATE TABLE table_name_65 (
grid VARCHAR,
manufacturer VARCHAR,
time_retired VARCHAR
) |
SELECT channel FROM table_178242_1 WHERE host_s_ = "Art Rooijakkers" | Which channel has the host Art Rooijakkers? | CREATE TABLE table_178242_1 (channel VARCHAR, host_s_ VARCHAR) |
SELECT DISTINCT gtype FROM Video_games | Show all video game types. | CREATE TABLE Video_games (gtype VARCHAR) |
SELECT Calendar_Date, Day_Number FROM Ref_Calendar ORDER BY Calendar_Date DESC | Show me the trend about what are all the calendar dates and day Numbers?, rank in descending by the x-axis please. | CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Description CHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
... |
SELECT premiere___aired FROM table_178242_1 WHERE channel = "VIER" | When did the program air on Vier? | CREATE TABLE table_178242_1 (premiere___aired VARCHAR, channel VARCHAR) |
SELECT gname, gtype FROM Video_games ORDER BY gname | Show all video games and their types in the order of their names. | CREATE TABLE Video_games (gname VARCHAR, gtype VARCHAR) |
SELECT "Centennial" FROM table_75759 WHERE "del Pueblo" = '1986' | Which Centennial has a del Pueblo of 1986? | CREATE TABLE table_75759 (
"Information" text,
"Altade\u00f1a" text,
"Aprende" text,
"Centennial" text,
"Kyrene MS" text,
"del Pueblo" text
) |
SELECT name FROM table_178242_1 WHERE channel = "Nederland 3" AND premiere___aired = "17 May 2008 – 21 June 2008" | What is the title that aired from 17 may 2008 – 21 june 2008 on Nederland 3? | CREATE TABLE table_178242_1 (name VARCHAR, channel VARCHAR, premiere___aired VARCHAR) |
SELECT gname FROM Video_games WHERE gtype = "Collectible card game" | Show all video games with type Collectible card game. | CREATE TABLE Video_games (gname VARCHAR, gtype VARCHAR) |
SELECT "Visiting Team" FROM table_71822 WHERE "Final Score" = '18-40' | Which visiting team wound up with a final score of 18-40? | CREATE TABLE table_71822 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
) |
SELECT seasons FROM table_178242_1 WHERE country___region = "Poland" | How many seasons did the show run in Poland? | CREATE TABLE table_178242_1 (seasons VARCHAR, country___region VARCHAR) |
SELECT gtype FROM Video_games WHERE gname = "Call of Destiny" | What is the type of video game Call of Destiny. | CREATE TABLE Video_games (gtype VARCHAR, gname VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'stress ulcer pr... | since 2105 what are the top four most common drugs prescribed to patients in the same hospital encounter after stress ulcer prophylaxis - famotidine? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... |
SELECT current_stock FROM table_17839_1 WHERE avg_trips_per_mile__×1000_ = 4744 | When 4744 is the avg. trips per mile (x1000) what is the current stock? | CREATE TABLE table_17839_1 (current_stock VARCHAR, avg_trips_per_mile__×1000_ VARCHAR) |
SELECT COUNT(*) FROM Video_games WHERE gtype = "Massively multiplayer online game" | How many video games have type Massively multiplayer online game? | CREATE TABLE Video_games (gtype VARCHAR) |
SELECT "Normal total" FROM table_70945 WHERE "Que." = '24' | Name the normal with que of 24 | CREATE TABLE table_70945 (
"Date enacted" text,
"Normal total" text,
"\u00a726 total" text,
"Ont." text,
"Que." text,
"N.S." text,
"N.B." text
) |
SELECT future_stock FROM table_17839_1 WHERE map_colour = "Green" | When green is the map colour what is the future stock? | CREATE TABLE table_17839_1 (future_stock VARCHAR, map_colour VARCHAR) |
SELECT gtype, COUNT(*) FROM Video_games GROUP BY gtype | Show all video game types and the number of video games in each type. | CREATE TABLE Video_games (gtype VARCHAR) |
SELECT bronze FROM table_name_90 WHERE location = "hiroshima" | Who won the bronze medal in Hiroshima? | CREATE TABLE table_name_90 (
bronze VARCHAR,
location VARCHAR
) |
SELECT COUNT(avg_trips_per_mile__) AS ×1000_ FROM table_17839_1 WHERE map_colour = "Turquoise" | When turquoise is the map colour how many avg. trips per mile (×1000) are there? | CREATE TABLE table_17839_1 (avg_trips_per_mile__ VARCHAR, map_colour VARCHAR) |
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) DESC LIMIT 1 | Which game type has most number of games? | CREATE TABLE Video_games (gtype VARCHAR) |
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-30273')) AND STRFTIME('%y-%m', medication.drugstarttime) = '210... | what is the name of the medication that patient 016-30273 was first prescribed in 09/2103? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... |
SELECT length FROM table_17839_1 WHERE map_colour = "Turquoise" | When turquoise is the map colour what is the length? | CREATE TABLE table_17839_1 (length VARCHAR, map_colour VARCHAR) |
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) LIMIT 1 | Which game type has least number of games? | CREATE TABLE Video_games (gtype VARCHAR) |
SELECT 1 AS st_run FROM table_name_95 WHERE downhill < 46 AND points = "84.45" | What is the 1st run that is down hill less than 46, and 84.45 points? | CREATE TABLE table_name_95 (
downhill VARCHAR,
points VARCHAR
) |
SELECT MAX(year_established) FROM table_1784514_1 | What is the latest year a division was established? | CREATE TABLE table_1784514_1 (year_established INTEGER) |
SELECT StuID FROM Student WHERE city_code = "CHI" | Show ids for all students who live in CHI. | CREATE TABLE Student (StuID VARCHAR, city_code VARCHAR) |
SELECT "Time" FROM table_66760 WHERE "Lane" = '7' | What was the time of the person in lane 7? | CREATE TABLE table_66760 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) |
SELECT number_of_powiats FROM table_1784514_1 WHERE capital = "Mstsislaw" | How many powiats have mstsislaw as a capital? | CREATE TABLE table_1784514_1 (number_of_powiats VARCHAR, capital VARCHAR) |
SELECT StuID FROM Student WHERE Advisor = 1121 | Show ids for all students who have advisor 1121. | CREATE TABLE Student (StuID VARCHAR, Advisor VARCHAR) |
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'valve replacement or repair - routine')) AND... | what is the maximum total cost for the hospital involving a procedure called valve replacement or repair - routine during the last year? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE l... |
SELECT COUNT(capital) FROM table_1784514_1 WHERE voivodeship_after_1569 = "Brest Litovsk Voivodeship" | How many capitals had brest litovsk voivodeship as voivodeship after 1569? | CREATE TABLE table_1784514_1 (capital VARCHAR, voivodeship_after_1569 VARCHAR) |
SELECT Fname FROM Student WHERE Major = 600 | Show first name for all students with major 600. | CREATE TABLE Student (Fname VARCHAR, Major VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME" AND demographic.days_stay > "23" | give me the number of patients whose discharge location is home and days of hospital stay is greater than 23? | 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 MAX(year_established) FROM table_1784514_1 WHERE number_of_powiats = "5 powiats" | What is the latest year established that had 5 powiats? | CREATE TABLE table_1784514_1 (year_established INTEGER, number_of_powiats VARCHAR) |
SELECT major, AVG(age), MIN(age), MAX(age) FROM Student GROUP BY major | Show the average, minimum, and maximum age for different majors. | CREATE TABLE Student (major VARCHAR, age INTEGER) |
SELECT date FROM table_name_70 WHERE sport = "academics" | Which date had a sport of Academics? | CREATE TABLE table_name_70 (
date VARCHAR,
sport VARCHAR
) |
SELECT parish__prestegjeld_ FROM table_178398_1 WHERE sub_parish__sogn_ = "Fortun" | In what parish is the sub-parish fortun? | CREATE TABLE table_178398_1 (parish__prestegjeld_ VARCHAR, sub_parish__sogn_ VARCHAR) |
SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2 | Show all advisors who have at least two students. | CREATE TABLE Student (advisor VARCHAR) |
SELECT "Tournament" FROM table_8507 WHERE "Black" = 'kramnik' AND "Opening" = 'b66 sicilian defence' | What tournament had a black of Kramnik and an opening of B66 Sicilian Defence? | CREATE TABLE table_8507 (
"White" text,
"Black" text,
"Year" real,
"Result" text,
"Moves" real,
"Tournament" text,
"Opening" text
) |
SELECT sub_parish__sogn_ FROM table_178398_1 WHERE location_of_the_church = "Fortun" | What is the sub-parish of the church located in Fortun? | CREATE TABLE table_178398_1 (sub_parish__sogn_ VARCHAR, location_of_the_church VARCHAR) |
SELECT COUNT(DISTINCT sportname) FROM Sportsinfo | How many sports do we have? | CREATE TABLE Sportsinfo (sportname VARCHAR) |
SELECT profits__billion_$_ FROM table_1682026_3 WHERE market_value__billion_$_ = "172.9" | What are the profits (in billions) of the company with a market value of 172.9 billion? | CREATE TABLE table_1682026_3 (
profits__billion_$_ VARCHAR,
market_value__billion_$_ VARCHAR
) |
SELECT MIN(year_built) FROM table_178398_1 WHERE location_of_the_church = "Jostedal" | What is the year that the oldest church was built in Jostedal? | CREATE TABLE table_178398_1 (year_built INTEGER, location_of_the_church VARCHAR) |
SELECT COUNT(DISTINCT StuID) FROM Sportsinfo | How many students play sports? | CREATE TABLE Sportsinfo (StuID VARCHAR) |
SELECT "to" FROM table_203_440 ORDER BY "rank" LIMIT 1 | which team had the top transfer come in ? | CREATE TABLE table_203_440 (
id number,
"rank" number,
"player" text,
"from" text,
"to" text,
"transfer fee\n(\u20ac million)" number,
"year" number
) |
SELECT parish__prestegjeld_ FROM table_178398_1 WHERE location_of_the_church = "Solvorn" | What parishes are in Solvorn? | CREATE TABLE table_178398_1 (parish__prestegjeld_ VARCHAR, location_of_the_church VARCHAR) |
SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y' | List ids for all student who are on scholarship. | CREATE TABLE Sportsinfo (StuID VARCHAR, onscholarship VARCHAR) |
SELECT "To par" FROM table_44993 WHERE "Country" = 'united states' AND "Score" = '73-68=141' AND "Player" = 'brad faxon' | What is the to par score from Brad Faxon of the United States with a score of 73-68=141? | CREATE TABLE table_44993 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) |
SELECT COUNT(parish__prestegjeld_) FROM table_178399_1 WHERE church_name = "Vilnes kyrkje" | Name the number of parish for vilnes kyrkje | CREATE TABLE table_178399_1 (parish__prestegjeld_ VARCHAR, church_name VARCHAR) |
SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y' | Show last names for all student who are on scholarship. | CREATE TABLE Student (Lname VARCHAR, StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR, onscholarship VARCHAR) |
SELECT MAX(against) FROM table_name_18 WHERE lost > 0 AND played < 6 | What is the maximum number of points against when the team has more than 0 losses and plays fewer than 6 games? | CREATE TABLE table_name_18 (
against INTEGER,
lost VARCHAR,
played VARCHAR
) |
SELECT parish__prestegjeld_ FROM table_178399_1 WHERE year_built = 1908 | Name the parish for 1908 | CREATE TABLE table_178399_1 (parish__prestegjeld_ VARCHAR, year_built VARCHAR) |
SELECT SUM(gamesplayed) FROM Sportsinfo | How many games are played for all students? | CREATE TABLE Sportsinfo (gamesplayed INTEGER) |
SELECT DISTINCT name, number FROM course WHERE credits = 18 AND department = 'EECS' | To get 18 credits , which courses should I take ? | 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 semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE... |
SELECT MAX(year_built) FROM table_178399_1 WHERE church_name = "Holmedal kyrkje" | Name the maximum year built for holmedal kyrkje | CREATE TABLE table_178399_1 (year_built INTEGER, church_name VARCHAR) |
SELECT SUM(gamesplayed) FROM Sportsinfo WHERE sportname = "Football" AND onscholarship = 'Y' | How many games are played for all football games by students on scholarship? | CREATE TABLE Sportsinfo (gamesplayed INTEGER, sportname VARCHAR, onscholarship VARCHAR) |
SELECT COUNT(qatari_female) FROM table_19309079_2 WHERE qatari_male = 97 | How many numbers were recorded for Qatari female when Qatari male was 97? | CREATE TABLE table_19309079_2 (
qatari_female VARCHAR,
qatari_male VARCHAR
) |
SELECT MIN(week) FROM table_17861179_1 WHERE game_site = "Shea Stadium" | What is the week where the game site is Shea Stadium? | CREATE TABLE table_17861179_1 (week INTEGER, game_site VARCHAR) |
SELECT sportname, COUNT(*) FROM Sportsinfo GROUP BY sportname | Show all sport name and the number of students. | CREATE TABLE Sportsinfo (sportname VARCHAR) |
SELECT "D 50 +" FROM table_57564 WHERE "D 48 +" = 'd 53 +' | Tell me the D 50 + for D 48 + of d 53 + | CREATE TABLE table_57564 (
"D 41 \u221a" text,
"D 42 \u221a" text,
"D 43 \u221a" text,
"D 44 \u221a" text,
"D 45 O" text,
"D 46 O" text,
"D 47 +" text,
"D 48 +" text,
"D 49 +" text,
"D 50 +" text
) |
SELECT result FROM table_17861179_1 WHERE week = 6 | For week 6, what were the results? | CREATE TABLE table_17861179_1 (result VARCHAR, week VARCHAR) |
SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID | Show all student IDs with the number of sports and total number of games played | CREATE TABLE Sportsinfo (StuID VARCHAR, gamesplayed INTEGER) |
SELECT COUNT("Episodes") FROM table_25405 WHERE "Season Premiere" = 'December 11, 2010' | How many episodes had a season premiere on December 11, 2010? | CREATE TABLE table_25405 (
"Season" real,
"Episodes" real,
"Timeslot (ET)" text,
"Season Premiere" text,
"Season Finale" text,
"TV Season" text,
"Rank" text,
"Viewers (in millions)" text
) |
SELECT COUNT(week) FROM table_17869717_1 WHERE date = "November 3" | In how many weeks was the game played on November 3 played? | CREATE TABLE table_17869717_1 (week VARCHAR, date VARCHAR) |
SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM(hoursperweek) > 10 | Show all student IDs with more than total 10 hours per week on all sports played. | CREATE TABLE Sportsinfo (StuID VARCHAR, hoursperweek INTEGER) |
SELECT SUM(attendance) FROM table_name_14 WHERE opponent = "green bay packers" | How many people attended the green bay packers game? | CREATE TABLE table_name_14 (
attendance INTEGER,
opponent VARCHAR
) |
SELECT broadcast_date FROM table_1785117_1 WHERE viewers__in_millions_ = "8.3" | What is the broadcast date when 8.3 million viewers watched? | CREATE TABLE table_1785117_1 (broadcast_date VARCHAR, viewers__in_millions_ VARCHAR) |
SELECT T2.Fname, T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY COUNT(*) DESC LIMIT 1 | What is the first name and last name of the student who have most number of sports? | CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR) |
SELECT "Home team" FROM table_54458 WHERE "Venue" = 'vfl park' | Which home team plays at VFL Park? | CREATE TABLE table_54458 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT broadcast_date FROM table_1785117_1 WHERE run_time = "25:12" | What is the broadcast date of the episode with run time 25:12? | CREATE TABLE table_1785117_1 (broadcast_date VARCHAR, run_time VARCHAR) |
SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1 | Which sport has most number of students on scholarship? | CREATE TABLE Sportsinfo (sportname VARCHAR, onscholarship VARCHAR) |
SELECT "Team" FROM table_37059 WHERE "Year" = '1999' AND "Versus" = 'zimbabwe' | what team played against zimbabwe in 1999? | CREATE TABLE table_37059 (
"Player" text,
"Team" text,
"Score" text,
"Versus" text,
"Year" real
) |
SELECT viewers__in_millions_ FROM table_1785117_1 WHERE run_time = "25:55" | How many million viewers watched the episode that runs 25:55 minutes? | CREATE TABLE table_1785117_1 (viewers__in_millions_ VARCHAR, run_time VARCHAR) |
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo | Show student ids who don't have any sports. | CREATE TABLE Sportsinfo (StuID VARCHAR); CREATE TABLE Student (StuID VARCHAR) |
SELECT AVG(total_votes) FROM table_name_75 WHERE _number_of_seats_won < 0 | Can you tell me the average Total votes that has the # of seats won smaller than 0? | CREATE TABLE table_name_75 (
total_votes INTEGER,
_number_of_seats_won INTEGER
) |
SELECT number_of_dances FROM table_17862135_3 WHERE couple = "Warren & Kym" | How many dances did Warren & Kym have? | CREATE TABLE table_17862135_3 (number_of_dances VARCHAR, couple VARCHAR) |
SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y' | Show student ids who are on scholarship and have major 600. | CREATE TABLE Sportsinfo (StuID VARCHAR, major VARCHAR, onscholarship VARCHAR); CREATE TABLE Student (StuID VARCHAR, major VARCHAR, onscholarship VARCHAR) |
SELECT name FROM table_name_74 WHERE type = "primary" AND dcsf_number > 2337 AND ofsted_number < 135339 | What is the name of the primary with a DCSF number larger than 2337 and an Ofsted number smaller than 135339? | CREATE TABLE table_name_74 (
name VARCHAR,
ofsted_number VARCHAR,
type VARCHAR,
dcsf_number VARCHAR
) |
SELECT total_points FROM table_17862135_3 WHERE average = "17.8" | What are the total points for the team that averages 17.8? | CREATE TABLE table_17862135_3 (total_points VARCHAR, average VARCHAR) |
SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = "Football" | Show student ids who are female and play football. | CREATE TABLE Sportsinfo (StuID VARCHAR, sex VARCHAR, sportname VARCHAR); CREATE TABLE Student (StuID VARCHAR, sex VARCHAR, sportname VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.