sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How many credits have been displayed from episode 1 until 10? | SELECT COUNT(T1.person_id) FROM Credit AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.credited = 'true' AND T2.episode BETWEEN 1 AND 10 |
Which student's age is older than 18 and is majoring in 600? List each student's first and last name. | SELECT Fname , Lname FROM Student WHERE Age > 18 AND Major = 600; |
Who was the team's opponent of October 25, 1970? | SELECT opponent FROM table_14966537_1 WHERE date = "October 25, 1970" |
What is the record for the 20000 m walk? | SELECT record FROM table_name_12 WHERE event = "20000 m walk" |
Can you find the first and last names of all people who paid more than the rooms' base prices? | SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0 |
What is Bandwidth Included, when Price is "50 EUR"? | SELECT bandwidth_included FROM table_name_45 WHERE price = "50 eur" |
What are the numbers of the players currently playing for Ironi Nahariya? | SELECT no FROM table_12962773_2 WHERE current_club = "Ironi Nahariya" |
What is the percentage of players who were born in Denmark and weight above 154 lbs? | SELECT CAST(COUNT(CASE WHEN T1.nation = 'Denmark' AND T2.weight_in_lbs > 154 THEN T1.ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id |
Sum up the likes get by short reviews on businesses located in City Goodyear. | SELECT SUM(T2.likes) AS likes FROM Business AS T1 INNER JOIN Tips AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Goodyear' |
What are the driver's names? | select forename,surname from drivers |
What is the muzzle energy with grains (g) bullet weight and a max pressure of 35,000 psi? | SELECT muzzle_energy FROM table_name_67 WHERE bullet_weight = "grains (g)" AND max_pressure = "35,000 psi" |
Could you also list their cities and state provinces? | SELECT T1.first_name , T1.last_name , T2.department_name , T3.city , T3.state_province 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 |
What is the plant hardiness zone in the Northern region where the annual precipitation is 443mm (17.4in)? | SELECT plant_hardiness_zone FROM table_name_36 WHERE region = "northern" AND annual_precipitation = "443mm (17.4in)" |
How many points against did the club with points have? | SELECT "points" AS _against FROM table_name_21 WHERE "points" = "points" |
Which eagle riders whose ova (harmony gold dub) is dr. kozaburo nambu? | SELECT eagle_riders FROM table_17480471_3 WHERE ova__harmony_gold_dub_ = "Dr. Kozaburo Nambu" |
what is the highest attendance when the week is smaller than 1? | SELECT MAX(attendance) FROM table_name_30 WHERE week < 1 |
What is Venue, when Date is "January 6, 1995"? | SELECT venue FROM table_name_35 WHERE date = "january 6, 1995" |
Find the names of items whose rank is higher than 3 and whose average rating is above 5. | SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rank > 3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id HAVING avg(T2.rating) > 5 |
Who was the first couple in the episode having a fourth couple of Sammy and Nat? | SELECT first_couple FROM table_25664518_3 WHERE fourth_couple = "Sammy and Nat" |
What rank was Lassi Karonen? | SELECT COUNT(rank) FROM table_name_9 WHERE athlete = "lassi karonen" |
Name the green for otaki | SELECT green FROM table_20217811_1 WHERE electorate = "Otaki" |
Find the name and capacity of the dorm with least number of amenities. | SELECT T1.dorm_name , T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1 |
Where was the game held on August 20, 2004? | SELECT venue FROM table_name_78 WHERE date = "august 20, 2004" |
What is the moving from with a transfer and the nationality of Bra? | SELECT moving_from FROM table_name_22 WHERE type = "transfer" AND nat = "bra" |
What are the order details of the products with price higher than 2000? | SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000 |
What is the color code and description of the product named "chervil"? | SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil" |
What is the direction of the route that stars at downtown transit center and has a terminus point at Pensacola Beach? | SELECT direction FROM table_name_50 WHERE starting_point = "downtown transit center" AND terminus = "pensacola beach" |
Among the films that the customer RUTH MARTINEZ has rented, how many of them are released in 2006? | SELECT COUNT(T1.customer_id) 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 T4.release_year = 2006 AND T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' |
Please list the titles of the movie lists user 32172230 created when he or she was eligible for trial. | SELECT T1.list_title FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 32172230 AND T2.user_eligible_for_trial = 1 |
Which services type had both successful and failure event details? | SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail' |
What are the names of instructors who advise more than one student? | SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING count(*) > 1 |
How many distinct transaction types are used in the transactions? | SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS |
What was the lowest attendance was the opponent was chelsea? | SELECT MIN(attendance) FROM table_name_68 WHERE opponent = "chelsea" |
Which date was the event that Yani won in a playoff over Yueh-Chyn Huang? | SELECT date FROM table_name_55 WHERE margin_of_victory = "playoff" AND runner_s__up = "yueh-chyn huang" |
What is the % identity to C7orf38 of the animal whose genus & species is Mus Musculus? | SELECT MAX(_percentage_identity_to_c7orf38) FROM table_26957063_3 WHERE genus_ & _species = "Mus musculus" |
List all the full names of patients with a condition described as cystitis. | SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.patient WHERE T2.DESCRIPTION = 'Cystitis' |
What is the most common interaction type between enzymes and medicine? And how many are there? | SELECT interaction_type , count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1 |
How many original 3rd us tour cast were there while the original uk cast was alyssa dipalma? | SELECT COUNT(original_3rd_us_tour_cast) FROM table_24353141_1 WHERE original_uk_cast = "Alyssa DiPalma" |
Show the number of high schoolers for each grade. | SELECT grade , count(*) FROM Highschooler GROUP BY grade |
List 10 movie titles that were produced in France. | SELECT T1.title FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T3.COUNTry_name = 'France' LIMIT 10 |
How many draws occured with a record of 10 losses, and 6 wins? | SELECT COUNT(draws) FROM table_name_38 WHERE losses = 10 AND wins > 6 |
What are the ids of all students who have advisor number 1121? | SELECT StuID FROM Student WHERE Advisor = 1121 |
How many episodes have the season number of 1? | SELECT COUNT(series__number) FROM table_17152787_3 WHERE season__number = 1 |
Who was the winner for Peter Jackson Racing at Mallala Motor Sport Park? | SELECT winner FROM table_name_9 WHERE team = "peter jackson racing" AND circuit = "mallala motor sport park" |
What was the Against when the Opposing Team was sheffield wednesday? | SELECT against FROM table_name_24 WHERE opposing_team = "sheffield wednesday" |
what is minimum area where the largest city is bloemfontein? | SELECT MIN(area__km_2__) FROM table_17416221_1 WHERE largest_city = "Bloemfontein" |
In restaurants with a review of 2, how many restaurants have a street number below 500? | SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.review = 2 AND T1.street_num < 500 |
Show me the count of students for the cities where have more than one student | SELECT city_code, count ( * ) FROM student group by city_code having count ( * ) >1 |
What is game2 tourist attraction name? | SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game2" |
Among the employees who are Trainees, how many of them work in New York? | SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Trainee' AND T2.state = 'NY' |
What are the names and capitals of each country? | SELECT Country_name , Capital FROM country |
Name of 900 north michigan, and a Year smaller than 1989 involves what lowest floors? | SELECT MIN(floors) FROM table_name_39 WHERE name = "900 north michigan" AND year < 1989 |
What's the most bronze medals for Great Britain (GBR) with more than 1 silver and ranked more than 6? | SELECT MAX(bronze) FROM table_name_35 WHERE rank > 6 AND nation = "great britain (gbr)" AND silver > 1 |
what are the names of the channels that broadcast in both morning and night? | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night' |
What game number had a record of 3-1? | SELECT game FROM table_20849830_1 WHERE record = "3-1" |
Which legislators do not have instagram account? | SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.instagram IS NULL |
Please indicate store id in the state of California that have been applied 20% discount in store. | SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.State = 'California' AND T1.`Sales Channel` = 'In-Store' AND T1.`Discount Applied` = 0.2 THEN T2.StoreID END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL |
Which Round has a Position of qb, and an Overall larger than 6? | SELECT MAX(round) FROM table_name_17 WHERE position = "qb" AND overall > 6 |
What is the name of the fastest roller coaster in Austria? | SELECT T2.name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID where T1.Name = "Austria" order by T2.speed desc limit 1 |
WHich Open Cup has a Division larger than 4? | SELECT open_cup FROM table_name_30 WHERE division > 4 |
What are the names of the movies that was reviewed by brittany harris? | SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' |
What is the total of overall values with a safety position in a round greater than 1? | SELECT COUNT(overall) FROM table_name_26 WHERE position = "safety" AND round > 1 |
How much Avg/G has a Name of robert marve, and a Gain smaller than 236? | SELECT SUM(avg_g) FROM table_name_32 WHERE name = "robert marve" AND gain < 236 |
Name the position for billy price | SELECT position FROM table_19730892_1 WHERE name = "Billy Price" |
Which nation has more than 6 Silver medals and fewer than 8 Gold medals? | SELECT AVG(total) FROM table_name_59 WHERE silver > 6 AND gold < 8 |
Which customer is the most in debt? | SELECT c_name FROM customer WHERE c_acctbal = ( SELECT MIN(c_acctbal) FROM customer ) |
How much was the prize money for rwe-sporthalle, mülheim ? | SELECT prize_fund FROM table_18828487_1 WHERE venue = "RWE-Sporthalle, Mülheim" |
Which u id has the least rank on the list? | SELECT u_id FROM review ORDER BY rank LIMIT 1 |
Very nice! Finally, could you update this list to show the average access count for these two documents? | SELECT avg ( access_count ) FROM documents where document_structure_code = ( select min ( document_structure_code ) from documents ) group by document_name |
Can you list the name of each camera lens and the number of photos taken by it? | SELECT T1.name , count ( * ) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id |
What is the premier league number when the position is forward, and the total is more than 22? | SELECT COUNT(premier_league) FROM table_name_16 WHERE position = "forward" AND total > 22 |
Name the candidate for south carolina 1? | SELECT candidates FROM table_1342359_39 WHERE district = "South Carolina 1" |
What was the lowest Crowd total from a game in which Essendon was the Away team? | SELECT MIN(crowd) FROM table_name_35 WHERE away_team = "essendon" |
Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. | SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There |
Tell me the school with a height of 6-9 | SELECT school FROM table_name_82 WHERE height = "6-9" |
find the names of all patients who have an undergoing treatment and are staying in room 111 | SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111 |
How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? | SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia' |
Which Grid has a Rider of loic napoleone? | SELECT AVG(grid) FROM table_name_14 WHERE rider = "loic napoleone" |
Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop. | SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" |
Which home team plays at the Western Oval? | SELECT home_team FROM table_name_50 WHERE venue = "western oval" |
For which colleges? | SELECT count ( * ) , cName FROM tryout GROUP BY cName |
What team drafted steve scifres? | SELECT nfl_team FROM table_13758243_1 WHERE player = "Steve Scifres" |
What is the birth date of the duchess who married on 1 May 1844? | SELECT birth FROM table_name_16 WHERE marriage = "1 may 1844" |
Which Production in 2009 had a Result of Nominated at the Helpmann awards Award Ceremony? | SELECT production FROM table_name_67 WHERE result = "nominated" AND year = 2009 AND award_ceremony = "helpmann awards" |
When was the premiere on the TVB Jade Channel? | SELECT premiere FROM table_name_86 WHERE channel = "tvb jade" |
What pick had a wide receiver named johnny holloway? | SELECT pick FROM table_name_66 WHERE position = "wide receiver" AND name = "johnny holloway" |
How many games have an Order of 1006, and Goals larger than 192? | SELECT SUM(games) FROM table_name_94 WHERE order = 1006 AND goals > 192 |
How many crimes were handled by Brendan Reilly on 7th October 2018? | SELECT SUM(CASE WHEN T2.alderman_last_name = 'Reilly' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN Ward AS T2 ON T1.ward_no = T2.ward_no WHERE T2.alderman_name_suffix IS NULL AND T2.alderman_first_name = 'Brendan' AND date LIKE '10/7/2018%' |
What are the names of the playlists? Available is defined as able to be used or obtained; at someone's disposal | SELECT name from playlists |
How many students participated in tryouts for each college by descennding count? | SELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC |
What is the name of each teacher and what course they teach? | SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID |
What was Derek Graham's time? | SELECT time FROM table_name_95 WHERE name = "derek graham" |
How much more votes for episode 1 than for episode 5? | SELECT SUM(CASE WHEN T1.episode = 1 THEN T2.votes ELSE 0 END) - SUM(CASE WHEN T1.episode = 5 THEN T2.votes ELSE 0 END) AS diff FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id; |
How many times has Ma Long won the men's singles? | SELECT COUNT(mens_doubles) FROM table_28138035_33 WHERE mens_singles = "Ma Long" |
What college is getting a player that attends Wichita Heights High School? | SELECT college FROM table_name_32 WHERE school = "wichita heights high school" |
Which Thumb stick has a Basic shape of curved, a Backlit of yes, and a Supplier of genius? | SELECT thumb_stick FROM table_name_37 WHERE basic_shape = "curved" AND backlit = "yes" AND supplier = "genius" |
What is the name of the student who has the highest total credits in the History department. | SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1 |
What is the most common nationality? | SELECT Nationality FROM member group by Nationality order by count ( * ) desc limit 1 |
How many results are there when the game was at the Atlanta-Fulton county stadium? | SELECT COUNT(result) FROM table_17848578_1 WHERE game_site = "Atlanta-Fulton County Stadium" |
Give the name of the highest paid instructor. | SELECT name FROM instructor ORDER BY salary DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.