sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How many users rated the movie "The Magnificent Ambersons" gave a rating score of no more than 2? List all the URL to the rating on Mubi. | SELECT COUNT(T2.user_id), T2.rating_url FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'The Magnificent Ambersons' AND T2.rating_score <= 2 |
Which Ages have a Capacity larger than 21, and an Ofsted of 106168? | SELECT ages FROM table_name_90 WHERE capacity > 21 AND ofsted = 106168 |
What is the highest round of the player with an overall of 152? | SELECT MAX(round) FROM table_name_38 WHERE overall = 152 |
What is the sum of bronze medals when the rank is greater than 2, and less than 2 total medals with silver medals being more than 0? | SELECT COUNT(bronze) FROM table_name_2 WHERE rank > 2 AND total < 2 AND silver > 0 |
What is the highest Bodyweight associated with a Clean & jerk larger than 120, and a Total (kg) of 245? | SELECT MAX(bodyweight) FROM table_name_37 WHERE clean_ & _jerk > 120 AND total__kg_ = 245 |
What is the color of the grape whose wine products had the lowest average price? | SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG ( Price ) LIMIT 1 |
Which country does customer with first name as Carole and last name as Bernhard live in? | SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" |
Runs smaller than 6106, and Inns smaller than 146 has what total number of matches? | SELECT COUNT(matches) FROM table_name_24 WHERE runs < 6106 AND inns < 146 |
What are the ids of the train running east? | SELECT id FROM trains WHERE direction = 'east' |
What is the role of Mark Hammel? | SELECT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Mark Hammel' |
What are the appelations for wines produced after 2008 but not in the Central Coast area? | SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast" |
What are the first and last name of the president of the club "Bootup Baltimore"? | SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t2.position = "President" |
What is District, when Incumbent is "Richard Neal"? | SELECT district FROM table_name_8 WHERE incumbent = "richard neal" |
List the id of students who attended statistics courses in the order of attendance date. | SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.date_of_attendance |
Which Japanese title has a Disc smaller than 12, and an Artist of kōzō murashita? | SELECT japanese_title FROM table_name_44 WHERE disc < 12 AND artist = "kōzō murashita" |
Which stage has a mountains classification of Mariano Piccoli and was won by Giuseppe Citterio? | SELECT stage FROM table_name_5 WHERE mountains_classification = "mariano piccoli" AND winner = "giuseppe citterio" |
Name the number location of georgia perimeter college | SELECT COUNT(location) FROM table_16734640_1 WHERE institution = "Georgia Perimeter College" |
Can you show me the minimum enrollment of all schools? | SELECT min ( enrollment ) FROM school |
What are all locations of train stations? | SELECT DISTINCT LOCATION FROM station |
For the grocery store located at "3635 W DIVERSEY AVE", how many inspections did it have? | SELECT COUNT(T2.inspection_id) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.address = '3635 W DIVERSEY AVE ' AND T1.facility_type = 'Grocery Store' |
what is 2012 when the tournament is win %? | SELECT 2012 FROM table_name_9 WHERE tournament = "win %" |
What are the catalog entry names of the products with next entry ID above 8? | SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8 |
what is the number of area where the county is marsabit? | SELECT COUNT(area__km_2__) FROM table_1404486_1 WHERE county = "Marsabit" |
What is the enrollment for the institution that joined in 1987? | SELECT MIN(enrollment) FROM table_2562113_1 WHERE joined = 1987 |
And the gender that is housed? | SELECT T1.dorm_name,T1.gender FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name,T1.gender FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room' |
What language was the film Pelle Erobreren, which received the best actor nomination, in? | SELECT language FROM table_name_11 WHERE category = "best actor" AND original_title = "pelle erobreren" |
what's the points total when points against was points against? | SELECT points_for FROM table_name_8 WHERE points_against = "points against" |
WHo is the Visitor on april 14? | SELECT visitor FROM table_name_78 WHERE date = "april 14" |
What are the login names and family names of course author and tutors? | SELECT login_name , family_name FROM Course_Authors_and_Tutors |
How many countries are listed? | SELECT count(*) FROM COUNTRIES; |
What was the constructor when there were 95 laps and a grid less than 15? | SELECT constructor FROM table_name_85 WHERE grid < 15 AND laps = 95 |
For the race called by Marshall Cassidy, who was the host? | SELECT s_host FROM table_22583466_5 WHERE race_caller = "Marshall Cassidy" |
What are the classes of races that have two or more corresponding races? | SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2 |
What position did athlete play from Tennessee state? | SELECT pos FROM table_name_86 WHERE college = "tennessee state" |
how many first elected with district is kansas 3 | SELECT COUNT(first_elected) FROM table_1342359_15 WHERE district = "Kansas 3" |
Name the number of former wnba team for 2 | SELECT COUNT(former_wnba_team) FROM table_17308269_2 WHERE pick = 2 |
display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN. | SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN') |
What is Tiger Woods' to par? | SELECT to_par FROM table_name_5 WHERE player = "tiger woods" |
In the state with the highest state appropriations to higher education in fiscal year 2011 per resident, which institution has the lowest number of undergraduates in 2010? | SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state INNER JOIN institution_grads AS T3 ON T3.unitid = T1.unitid WHERE T1.student_count = ( SELECT MIN(T1.student_count) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state INNER JOIN institution_grads AS T3 ON T3.unitid = T1.unitid WHERE T3.year = 2010 ) AND T3.year = 2010 GROUP BY T1.state ORDER BY SUM(T2.state_appr_value) DESC LIMIT 1 |
What is the Home team score for the Away team of North Melbourne? | SELECT home_team AS score FROM table_name_69 WHERE away_team = "north melbourne" |
What is the phone number of all companies where the last name of the contact person starts with the letter M and are not from Germany? | SELECT phone FROM customers WHERE contactLastName LIKE 'M%' AND country != 'Germany' |
how many home game there | SELECT count ( * ) FROM home_game |
What is the copa conmebol 1996 result of the team with a recopa sudamericana 1996 result of champions? | SELECT copa_conmebol_1996 FROM table_name_49 WHERE recopa_sudamericana_1996 = "champions" |
What is every institution with the nickname of Quakers? | SELECT institution FROM table_261954_1 WHERE nickname = "Quakers" |
Find the salary and manager number for those employees who is working under a manager. | SELECT salary , manager_id FROM employees WHERE manager_id != "null" |
What categories have two or more corresponding books that were made after 1989? | SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2 |
What is the result when the candidates are alexander smyth (dr) 100% | SELECT result FROM table_2668336_24 WHERE candidates = "Alexander Smyth (DR) 100%" |
What is the number of league goals for players with 10 league matches and a TeBe career of 2003? | SELECT league_goals FROM table_28730459_3 WHERE league_matches = 10 AND tebe_career = "2003" |
Name the most recent movie rented by Dorothy Taylor. | SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'DOROTHY' AND T1.last_name = 'TAYLOR' ORDER BY T2.rental_date DESC LIMIT 1 |
List the names of aircrafts and that did not win any match. | SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH) |
Which Res has a Method of decision (unanimous) and an Opponent of Wataru Sakata? | SELECT res FROM table_name_10 WHERE method = "decision (unanimous)" AND opponent = "wataru sakata" |
List down person's name who has nickname. | SELECT name FROM Person WHERE nickname IS NOT NULL; |
What country has david toms as the player? | SELECT country FROM table_name_43 WHERE player = "david toms" |
When is the earliest year opened for huff hall that was established after 1974? | SELECT MIN(opened) FROM table_name_20 WHERE venue = "huff hall" AND established > 1974 |
How many addresses does it have? | SELECT COUNT ( * ) FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count ( * ) DESC LIMIT 1 |
Who was the away team at the Win Entertainment Centre? | SELECT away_team FROM table_name_31 WHERE venue = "win entertainment centre" |
Find the id and last name of the teacher that has the most detentions with detention type code "AFTER"? | SELECT T1.teacher_id , T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = "AFTER" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1 |
In what division was there a population density in km2 of 4,491.8 in 2011? | SELECT administrative_division FROM table_24027047_1 WHERE population_density___km²_2011_ = "4,491.8" |
Among the objects that have multiple relations, how many images whose captions for the prediction class ids are "on"? | SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID != T1.OBJ2_SAMPLE_ID AND T2.PRED_CLASS = 'on' |
What NHL team picked Sergei Luchinkin? | SELECT nhl_team FROM table_2886617_8 WHERE player = "Sergei Luchinkin" |
Find the name and partition id for users who tweeted less than twice. | SELECT T1.name , T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) < 2 |
What is the average of all transactions? | The average of all transactions is 11198167.237771427 | What is the average of all transactions with the transaction type code "PUR"? | SELECT avg ( amount_of_transaction ) FROM TRANSACTIONS WHERE transaction_type_code = "PUR" |
What is the total value of cancelled orders? | SELECT SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T2.status = 'Cancelled' |
Which song had Central Station as a label and whose album was Various - Wild Nights 4? | SELECT song FROM table_name_33 WHERE label = "central station" AND album = "various - wild nights 4" |
Which Country has a Score of 67? | SELECT country FROM table_name_84 WHERE score = 67 |
who is third place when the tournament is delray beach? | SELECT third_place FROM table_name_77 WHERE tournament = "delray beach" |
How many Lanes have a Time larger than 13.59, and a Rank larger than 8? | SELECT SUM(lane) FROM table_name_36 WHERE time > 13.59 AND rank > 8 |
State the podcast title, content review and rating for all reviews with titled 'Love it!' | SELECT DISTINCT T1.title, T2.content, T2.rating FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Love it!' |
In which country's latest trade data and latest water withdrawal data were both updated in the year 2013? Give its long name and Alpha 2 code. | SELECT LongName, Alpha2Code FROM Country WHERE LatestTradeData = 2013 AND LatestWaterWithdrawalData = 2013 |
What's the record of the game with number 40? | SELECT record FROM table_23285761_7 WHERE game = 40 |
Which country does customer with first name as Carole and last name as Bernhard lived in? | SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" |
List the top 10 customers by total gross sales. List customers' first and last name and total gross sales. | SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10; |
What is the up/down associated with the Subiaco Oval? | SELECT up_down FROM table_2472711_32 WHERE venue = "Subiaco Oval" |
When the winning team of mathiasen motorsports has a pole position of jonathan bomarito, who has the fastest lap? | SELECT fastest_lap FROM table_name_97 WHERE winning_team = "mathiasen motorsports" AND pole_position = "jonathan bomarito" |
What is the first and last name of all students who play Football or Lacrosse? | 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" |
Which song has the most vocals? | SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1 |
Who came in 3rd place in 1990? | SELECT 3 AS rd_place FROM table_name_20 WHERE year = "1990" |
What was John Fought's score? | SELECT score FROM table_name_96 WHERE player = "john fought" |
What is the lowest Round, when Pick is 9 (via Hamilton)? | SELECT MIN(round) FROM table_name_66 WHERE pick = "9 (via hamilton)" |
Who is the Ice level reporter after 1992 with the color commentator John Davidson and the play-by-play Marv Albert? | SELECT ice_level_reporters FROM table_name_58 WHERE color_commentator_s_ = "john davidson" AND play_by_play = "marv albert" AND year > 1992 |
What is the least popular kind of decor? | SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1; |
What is the date of the Last Performance of Billy Elliot with a Cast Status of past replacement? | SELECT last_performance FROM table_name_46 WHERE status = "past replacement" |
Write all the review titles and the contents belonging to the podcast 'More Stupider: A 90-Day Fiance Podcast' with a review rating of 1. | SELECT title, content FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'More Stupider: A 90-Day Fiance Podcast' ) AND rating = 1 |
How many dates of polls occur in the Madhya Pradesh state? | SELECT COUNT(date_of_polls) FROM table_15329030_1 WHERE state = "Madhya Pradesh" |
What injury had maicon | Maicon had the injury Knee problem. | how may total attendance have fedexfield | SELECT total_attendance from stadium where name = "FedExField" |
What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010? | SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010 |
What is largest series number for the episode that aired February 16, 1957? | SELECT MAX(series__number) FROM table_25800134_1 WHERE airdate = "February 16, 1957" |
A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size. | SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8; |
Great. Would you please list the ids, names and genders of architects have built one mill? | SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count ( * ) = 1 |
For the group name European Progressive Democrats what is the French abbr? | SELECT french_abbr FROM table_name_23 WHERE group_name = "european progressive democrats" |
Show the names of cities in counties that have a crime rate less than 100. | SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100) |
What are the types of vocals used in the song "Le Pop"? | SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
Can you show me the names of the first five customers? | SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5 |
In rated PG movies, how many of them released in June 1990? | SELECT COUNT(*) FROM movie WHERE `MPAA Rating` = 'PG' AND `Release Date` LIKE '1990-06%' |
What is the amount of snow where the days for storms are 31? | SELECT SUM(snow__days_year_) FROM table_name_61 WHERE storms__days_year_ = 31 |
Name the crew chief for rhonda thorson | SELECT crew_chief FROM table_24535095_2 WHERE listed_owner_s_ = "Rhonda Thorson" |
Which tourist attractions are visited at least twice? Give me their names and ids. | SELECT T1.Name , T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) >= 2 |
What city is fuhlsbüttel airport in? | SELECT city FROM table_name_1 WHERE airport = "fuhlsbüttel airport" |
What is the value in 2009 at the French Open? | SELECT 2009 FROM table_name_86 WHERE tournament = "french open" |
What was the highest number of games played when they had over 14 against and 3 losses? | SELECT MAX(played) FROM table_name_27 WHERE against > 14 AND lost = 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.