sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
show the train name and station name for each train. | SELECT T2.name , T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id |
Score of 8 - 1 happened on what day in December? | SELECT december FROM table_name_27 WHERE score = "8 - 1" |
Who directed the episode watched by 2.01 million US viewers? | SELECT directed_by FROM table_28466323_2 WHERE us_viewers__million_ = "2.01" |
What are the names of poker players, ordered ascending by the number of final tables they have made? | SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made |
What is the lowest against score for Twickenham, London with the status of Five Nations against Ireland? | SELECT MIN(against) FROM table_name_16 WHERE venue = "twickenham, london" AND status = "five nations" AND opposing_teams = "ireland" |
Which Multiplier has a Front Side Bus of 200 mhz, and a Frequency of 1200 mhz? | SELECT multiplier FROM table_name_98 WHERE front_side_bus = "200 mhz" AND frequency = "1200 mhz" |
What is the record when the score was 2–0? | SELECT record FROM table_name_45 WHERE score = "2–0" |
Find the distinct last names of all the students who have president votes and whose advisor is not 2192. | SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "2192" |
what are the names of the institution and building here | SELECT T1.name , T2.institution FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id |
What are the total order quantities of photo products? | SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = "photo" |
For each station, find its latitude and the minimum duration of trips that ended at the station. | SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id |
Among all the menu pages with the appearance of the dish "Clear green turtle", how many of them have the dish at a stable price? | SELECT SUM(CASE WHEN T1.name = 'Clear green turtle' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.highest_price IS NULL |
List the IDs of all the directors who worked on French films. | SELECT T2.directorid FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'France' |
What is the sum of attendance for the games played at Los Angeles Rams? | SELECT SUM(attendance) FROM table_name_39 WHERE opponent = "at los angeles rams" |
What is in 2001, that has the year 2006, 2r, and in 2010 an A? | SELECT 2001 FROM table_name_71 WHERE 2006 = "2r" AND 2010 = "a" |
Find the id and name of the stadium where the largest number of injury accidents occurred. | SELECT T1.id , T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1 |
What is the call sign for the station that uses the branding, mom's radio 101.5 tacloban? | SELECT callsign FROM table_17487395_1 WHERE branding = "Mom's Radio 101.5 Tacloban" |
Which bumping/blocking has a yes for both the ankle tap and steal/intercept ball? | SELECT bumping_blocking FROM table_name_49 WHERE ankle_tap = "yes" AND steal_intercept_ball = "yes" |
Which entrant has a year after 1999? | SELECT entrant FROM table_name_59 WHERE year > 1999 |
How many actors have acted in both US or UK films? | SELECT COUNT(T1.actorid) FROM movies2actors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'USA' OR T2.country = 'UK' |
To which predicted relation class does the self-relation of the object sample in image no.5 belong? | SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 5 AND T2.OBJ1_SAMPLE_ID = T2.OBJ2_SAMPLE_ID |
what's the highest acc percent score? | SELECT acc_percent FROM basketball_match order by acc_percent desc limit 1 |
What are all the employee ids and the names of the countries in which they work? | SELECT T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id |
What is the difference between the actual manufacturing cost of product number 818 and the estimated manufacturing cost? | SELECT PlannedCost - ActualCost FROM WorkOrderRouting WHERE ProductID = 818 |
Which home team played against Hawthorn? | SELECT home_team AS score FROM table_name_49 WHERE away_team = "hawthorn" |
What was the result for the 2012 ibjjf world jiu-jitsu championships event when the method was points (4 x 0)? | SELECT result FROM table_name_95 WHERE event = "2012 ibjjf world jiu-jitsu championships" AND method = "points (4 x 0)" |
What are the amenities of the dorm that the oldest student lives in? | SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.age = ( select max ( age ) from student ) |
Which December has a Game of 37 and Points smaller than 47? | SELECT AVG(december) FROM table_name_35 WHERE game = 37 AND points < 47 |
What game was the final score 82-79? | SELECT game FROM table_name_60 WHERE score = "82-79" |
who is the away team when the home team is luton town? | SELECT away_team FROM table_name_11 WHERE home_team = "luton town" |
Who is the player from the United States in T4 place with a score of 68-73-68=209? | SELECT player FROM table_name_77 WHERE country = "united states" AND place = "t4" AND score = 68 - 73 - 68 = 209 |
How many companies operates airlines in each airport? | SELECT T3.id , count(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id |
When was the person(s) who were canonised before 1988 beatified? | SELECT beatified FROM table_name_17 WHERE canonised < 1988 |
What was Jack Nicklaus's score after round 1? | SELECT MIN(score) FROM table_name_97 WHERE player = "jack nicklaus" |
What lead has the third David Nedohin? | SELECT lead FROM table_name_98 WHERE third = "david nedohin" |
How many customers in this table? | SELECT count ( cust_name ) FROM customer |
How many ingredients are required to make the Raspberry Chiffon Pie? | SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Raspberry Chiffon Pie' |
What are the maximum and minimum number of cows across all farms. | SELECT max(Cows) , min(Cows) FROM farm |
What is the geust with a 0:1 result? | SELECT geust FROM table_name_65 WHERE result = "0:1" |
List the id of students who never attends courses? | SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance) |
What is the average crowd for the home team of North Melbourne? | SELECT AVG(crowd) FROM table_name_97 WHERE home_team = "north melbourne" |
For what motion picture did Samuel L. Jackson win the best supporting actor award before 1997? | SELECT motion_picture FROM table_name_42 WHERE award = "best supporting actor" AND actor = "samuel l. jackson" AND year < 1997 |
What is the highest Pick that is wide receiver with overall of 29? | SELECT MAX(pick__number) FROM table_name_60 WHERE position = "wide receiver" AND overall = 29 |
What are the region names affected by the storm with a number of deaths of least 10? | SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10; |
Among the employees born before 1980 , how many of them are single? | SELECT COUNT(BusinessEntityID) FROM Employee WHERE MaritalStatus = 's' AND BirthDate < '1980-1-1' |
What is the rank of Rmax Rpeak ( Pflops ) of 17.173 20.133? | SELECT AVG(rank) FROM table_name_7 WHERE rmax_rpeak___pflops__ = "17.173 20.133" |
Find the name of the person who has no student friends. | SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student' |
what is the average bronze when gold is more than 0, the nation is greece and silver is less than 0? | SELECT AVG(bronze) FROM table_name_75 WHERE gold > 0 AND nation = "greece" AND silver < 0 |
Find the name of the airports located in Cuba or Argentina. | SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina' |
In which country is the store where Hector Poinexter rents equipment located? | SELECT T5.country FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN address AS T3 ON T2.address_id = T3.address_id INNER JOIN city AS T4 ON T3.city_id = T4.city_id INNER JOIN country AS T5 ON T4.country_id = T5.country_id WHERE T1.first_name = 'HECTOR' AND T1.last_name = 'POINDEXTER' |
Find the average and oldest age for students with different sex. | SELECT avg(age) , max(age) , sex FROM student GROUP BY sex |
What League was played in 2007? | SELECT league FROM table_2380212_1 WHERE year = 2007 |
How many track numbers were called song 2? | SELECT COUNT(track_no) FROM table_28715942_3 WHERE track = "Song 2" |
How many Gold medals did Japan receive who had a Total of more than 1 medals? | SELECT SUM(gold) FROM table_name_39 WHERE nation = "japan" AND total > 1 |
what is the game when march is 15? | SELECT SUM(game) FROM table_name_12 WHERE march = 15 |
hi. can you tell me how many players are from OU College? | SELECT count ( * ) FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = "OU" |
Yes, what is their speed? | SELECT Roller_Coaster_ID , status, Speed FROM roller_coaster WHERE LENGTH > 3300 and Height > 100 |
What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor? | SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor |
Please list the titles of all the movie produced by production company "Universal Pictures". | SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Universal Pictures' |
Which Joined has a Nickname of knights, and an Enrollment larger than 2,960? | SELECT SUM(joined) FROM table_name_61 WHERE nickname = "knights" AND enrollment > 2 OFFSET 960 |
What is the highest Rank, when Director is "Henry Hathaway"? | SELECT MAX(rank) FROM table_name_63 WHERE director = "henry hathaway" |
How many times has Bob Fosse been nominated? | SELECT count ( * ) FROM musical WHERE Nominee = "Bob Fosse" |
Which season was 2nd position? | SELECT season FROM table_name_84 WHERE position = "2nd" |
Please list the titles of the podcasts for which the author whose ID is F7E5A318989779D has written a review. | SELECT T2.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = 'F7E5A318989779D' |
Find the name of route that has the highest number of deliveries. | SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1 |
Name the player who has the most NHL points in draft year. | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.P = ( SELECT MAX(P) FROM SeasonStatus ) |
List the names of people that are not employed by any company | SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment) |
Where did someone run a 58:33? | SELECT event_place FROM table_name_25 WHERE time = "58:33" |
what is the average number of faculty members? | Do you mean the average number of FacID? | yes | SELECT AVG ( FacID ) FROM Faculty |
Find how many different affiliation types there are. | SELECT count(DISTINCT affiliation) FROM university |
who are all the visitor with a record of 25–18 | SELECT visitor FROM table_11964047_7 WHERE record = "25–18" |
Find the captain rank that has no captain in Third-rate ship of the line class. | SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line' |
What CFL teams are part of Simon Fraser college? | SELECT cfl_team FROM table_10975034_4 WHERE college = "Simon Fraser" |
Which Car # has a Make of toyota, and a Driver of mike skinner, and a Pos larger than 3? | SELECT MAX(car__number) FROM table_name_19 WHERE make = "toyota" AND driver = "mike skinner" AND pos > 3 |
Which city in Texas hosts the Frank Erwin center? | SELECT city FROM table_name_58 WHERE state = "texas" AND venue = "frank erwin center" |
How many built year same in this table? | did you mean 'How many built year saved this table'? | Yes. | SELECT count ( distinct Built_Year ) FROM ship |
what is the maximum season where leading goalkicker is scott simister (54) | SELECT MAX(season) FROM table_1165048_1 WHERE leading_goalkicker = "Scott Simister (54)" |
Who has the lead in the season where Cathrine Norberg is second and Anna Rindeskog is third? | SELECT lead FROM table_name_70 WHERE second = "cathrine norberg" AND third = "anna rindeskog" |
What is the total of laps run by the driver with a grid under 17 and a time of +5.088? | SELECT SUM(laps) FROM table_name_3 WHERE time = "+5.088" AND grid < 17 |
How many players, who were drafted by Anaheim Ducks in 2008, have played for U.S. National U18 Team? | SELECT COUNT(DISTINCT T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.overallby = 'Anaheim Ducks' AND T1.draftyear = 2008 AND T2.TEAM = 'U.S. National U18 Team' |
Show the name, open date, and organizer for all churches. | SELECT name , open_date , organized_by FROM Church |
Which papers' first author is affiliated with an institution in the country "Japan" and has last name "Ohori"? Give me the titles of the papers. | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "Japan" AND t2.authorder = 1 AND t1.lname = "Ohori" |
Which part fault requires the most number of skills to fix? List part id and name. | SELECT T1.part_id , T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id ORDER BY count(*) DESC LIMIT 1 |
Name the eliminated 7th voted out day 21 | SELECT eliminated FROM table_24233848_2 WHERE finish = "7th voted Out Day 21" |
Which year did Maryland hold the title with Railroaders LL Brunswick? | SELECT year FROM table_13012165_1 WHERE maryland = "Railroaders LL Brunswick" |
What is the Twitter ID of Emanuel Cleaver? | SELECT T1.twitter_id FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Emanuel' AND T2.last_name = 'Cleaver' |
What is the total number of bronze medals for teams with less than 0 silver? | SELECT COUNT(bronze) FROM table_name_98 WHERE silver < 0 |
For each station, return its longitude and the average duration of trips that started from the station. | SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id |
What are their names? | Do you mean the photos name | Yes | SELECT T1.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id group by T1.name having T2.brand = 'Olympus' |
What are the first names of all students who live in the dorm with the most amenities? | SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY count(*) DESC LIMIT 1) |
Which Rank has a Name of tsvetelina kirilova, and a Result smaller than 55.97? | SELECT MAX(rank) FROM table_name_73 WHERE name = "tsvetelina kirilova" AND result < 55.97 |
How many transfer windows coming from Crystal Palace? | SELECT COUnT AS transfer_window FROM table_17596418_4 WHERE moving_from = "Crystal palace" |
Set 1 of 25–20, what was Set 2? | SELECT set_2 FROM table_name_38 WHERE set_1 = "25–20" |
How many people directed episode 2? | SELECT COUNT(directed_by) FROM table_29545336_2 WHERE no = 2 |
What is matk user id | SELECT u_id FROM useracct WHERE name = 'Mark' |
What TV channel had a license from Boston? | SELECT channel_tv___dt__ FROM table_1353096_2 WHERE city_of_license_market = "Boston" |
How many candidates are there? | SELECT COUNT(*) FROM candidate |
Which Round has a Pick of 174? | SELECT round FROM table_name_47 WHERE pick = 174 |
What is listed for the Elevator, that also has the Cardinalatial title of Deacon of S. Maria in Portico? | SELECT elevator FROM table_name_78 WHERE cardinalatial_title = "deacon of s. maria in portico" |
What is the average for matches with a prize money amount of £3,000? | SELECT AVG(matches) FROM table_name_56 WHERE prize_money = "£3,000" |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.