sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which category has the most reviews? | SELECT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id GROUP BY T1.category ORDER BY COUNT(T2.podcast_id) DESC LIMIT 1 |
Count the number of players who were born in USA and have bats information 'R'. | SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'; |
What 2010 has a 2006 less than 6.9, a 2008 greater than 1.6, and 2 for 2007? | SELECT 2010 FROM table_name_21 WHERE 2006 < 6.9 AND 2008 > 1.6 AND 2007 = 2 |
And how many players go there? | select count ( distinct player_id ) from player_college where college_id = ( SELECT T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count ( * ) DESC LIMIT 1 ) |
What is W/m², when η (%) is greater than 16.5, and when Technology is MJ? | SELECT w_m² FROM table_name_60 WHERE η___percentage_ > 16.5 AND technology = "mj" |
Show the attendances of the performances at location "TD Garden" or "Bell Centre" | SELECT Attendance FROM performance WHERE LOCATION = "TD Garden" OR LOCATION = "Bell Centre" |
Name the most margin for nco party and p. ramachandran won | SELECT MAX(margin) FROM table_22754310_1 WHERE party = "NCO" AND winner = "P. Ramachandran" |
What is the average lane for Kenya with react larger than 0.212? | SELECT AVG(lane) FROM table_name_79 WHERE nationality = "kenya" AND react > 0.212 |
How many artworks are there? | SELECT COUNT(*) FROM artwork |
Which team has nc position for 2010 season? | SELECT team FROM table_23338693_1 WHERE position = "NC" AND season = 2010 |
How many people live at each of them? | SELECT Residence, count ( * ) FROM player GROUP BY Residence |
What's the official name of the place with an Area KM 2 of 295.07 | SELECT official_name FROM table_171236_2 WHERE area_km_2 = "295.07" |
Which Opponent has a February larger than 7 and Record of 37-16-4? | SELECT opponent FROM table_name_3 WHERE february > 7 AND record = "37-16-4" |
Show the transaction type descriptions and dates if the share count is smaller than 10. | SELECT T1.transaction_type_description , T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 |
Which branding has the callsign of DXGH? | SELECT branding FROM table_28794440_1 WHERE callsign = "DXGH" |
Which store in Arizona has the most net profit? | SELECT T2.StoreID FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.State = 'Arizona' ORDER BY T1.`Unit Price` - T1.`Unit Cost` DESC LIMIT 1 |
Did any artist ID appear more than once in the weeks spent on top? | Do you mean the artists id which has more than one volume? | Yes please. | SELECT Artist_ID from volume group by artist_id having count ( * ) > = 2 |
What lost has 86 points? | SELECT lost FROM table_name_67 WHERE points = "86" |
What is the average yards for Jimmie Giles in a game larger than 15 and reception larger than 2? | SELECT AVG(yards) FROM table_name_81 WHERE games > 15 AND reception > 2 AND player = "jimmie giles" |
How many students have the same Fname? | select count ( StuID ) from student where Fname in ( SELECT Fname FROM student group by Fname having count ( * ) >1 ) |
How many titles does Episode 2 have | SELECT COUNT(title) FROM table_165732_2 WHERE episode__number = 2 |
what was the lowest elevation in april 2006? | SELECT MIN(elevation_ft) FROM table_27435931_1 WHERE year = "April 2006" |
who are the participants from hanover? | SELECT contestant FROM table_26427332_17 WHERE city = "Hanover" |
Can you tell me the name for this attraction as well? | SELECT T2.name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1" |
Can you show me the origins, the destinations and the flight numbers? | SELECT origin, destination, flno FROM Flight GROUP BY destination |
What is the percentage of employees are in Paris office? | SELECT CAST(COUNT(CASE WHEN t1.city = 'Paris' THEN t2.employeeNumber ELSE NULL END) AS REAL) * 100 / COUNT(t2.employeeNumber) FROM offices AS t1 INNER JOIN employees AS t2 ON t1.officeCode = t2.officeCode |
What is the release date of production number 1327? | SELECT release_date FROM table_name_60 WHERE production_number = 1327 |
What date had a 4ad label and a CD (reissue) format? | SELECT date FROM table_name_99 WHERE label = "4ad" AND format = "cd (reissue)" |
Who are the recipients in 1994? | SELECT recipients_and_nominees FROM table_name_73 WHERE year = 1994 |
What is the torque when engine code is N46B20 and power is ps (kw; hp)@6400? | SELECT torque FROM table_name_97 WHERE engine_code = "n46b20" AND power = "ps (kw; hp)@6400" |
What is the average and maximum capacities for all stadiums ? | SELECT AVG(capacity), MAX(capacity) FROM stadium |
when was the ship launched when it was laid down 20 october 1924 and built by fujinagata shipyards, japan? | SELECT launched FROM table_name_36 WHERE builder = "fujinagata shipyards, japan" AND laid_down = "20 october 1924" |
Give me the list of nominees that has been nominated multiple times for musicals | SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT ( * ) > 1 |
How many user ids from 1 to 20 have no fan users and have low ratings? | SELECT COUNT(user_id) FROM Users WHERE user_id BETWEEN 1 AND 20 AND user_fans LIKE 'None' AND user_review_count LIKE 'Low' |
Which company published the game with the most sales in North America? | SELECT T.publisher_name FROM ( SELECT T5.publisher_name, SUM(T2.num_sales) * 100000 FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T1.region_name = 'North America' GROUP BY T5.publisher_name ORDER BY SUM(T2.num_sales) * 100000 DESC LIMIT 1 ) t |
What are the denomination more than one school have? | SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1 |
What are the first name and major of the students who are able to consume soy? | SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Soy") |
COunt the average Enrollment in hope? | SELECT AVG(enrollment) FROM table_name_32 WHERE location = "hope" |
find the file size for Farida? | SELECT file_size from files where artist_name = "Farida" |
What are the first name and department name of all employees? | SELECT T1.first_name , T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id |
What are the name of the players who received a card in descending order of the hours of training? | SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC |
Return the first names and last names of employees who earn more than 30000 in salary. | SELECT fname , lname FROM employee WHERE salary > 30000 |
What is the £1 fraction when the reverse is hare? | SELECT £1_fraction FROM table_1682865_1 WHERE reverse = "Hare" |
Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100. | SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY sum(T1.amount) DESC LIMIT 1 |
How many critics were given to the movie that got the most movie popularity number. | SELECT COUNT(T1.critic) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_popularity = ( SELECT MAX(movie_popularity) FROM movies ) |
Tell me the overall rank for heat rank of 8 | SELECT overall_rank FROM table_name_60 WHERE heat_rank = 8 |
What is the average years of working for journalists from England. | SELECT avg ( years_working ) FROM journalist WHERE Nationality = "England" |
How many books fall into each category? | SELECT category , count(*) FROM book_club GROUP BY category |
What was the home team score when the VFL played at Western Oval? | SELECT home_team AS score FROM table_name_65 WHERE venue = "western oval" |
What is the analogue terrestrial channel when the internet shows channel4.com? | SELECT analogue_terrestrial_channel FROM table_name_95 WHERE internet = "channel4.com" |
Show the student id of the oldest student. | SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student) |
What is the nationality of the Team Georgia Tech? | SELECT nationality FROM table_name_47 WHERE school_club_team = "georgia tech" |
who won with a score of 199 (-14) on oct 31? | SELECT winner FROM table_name_21 WHERE score = "199 (-14)" AND date = "oct 31" |
Which Score is the lowest one that has a Year of 1868? | SELECT MIN(score) FROM table_name_75 WHERE year = 1868 |
What is the destination of the route kulitthurai,neyyattinkara? | SELECT destination FROM table_29770377_1 WHERE route_via = "Kulitthurai,Neyyattinkara" |
What Engine does the w123.026 chassis have? | SELECT engine FROM table_name_53 WHERE chassis_code = "w123.026" |
Tell me the region for frank erwin center | SELECT region FROM table_name_10 WHERE venue = "frank erwin center" |
List names of all pilot aged 30 or younger in descending alphabetical order. | SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC |
What is the percentage of American coaches among all the coaches who taught the Montreal Canadiens? | SELECT SUM(CAST(T2.W AS REAL) / T2.G) / SUM(T2.G + T2.W) FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' |
When the Home team of footscray is playing, what's the Home team score? | SELECT home_team AS score FROM table_name_53 WHERE home_team = "footscray" |
What Televote Points had a Final Points score of 2? | SELECT televote_points FROM table_name_43 WHERE final_points = "2" |
How many orders were made by customers who live in Texas at the Central superstore? | SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.State = 'Texas' |
What date got 9.82 million viewers? | SELECT original_air_date FROM table_11562143_1 WHERE us_viewers__million_ = "9.82" |
What pick number was player Greg McKegg? | SELECT AVG(pick__number) FROM table_name_13 WHERE player = "greg mckegg" |
What is the range of rental cost for the films? | SELECT min ( rental_rate ) , max ( rental_rate ) from film |
What is the day of the week that tweet with ID tw-682712873332805633 was posted? | SELECT Weekday FROM twitter WHERE TweetID = 'tw-682712873332805633' |
List the name of all projects that are operated longer than the average working hours of all projects. | SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects) |
what shows for 3rd place in 1990? | SELECT 3 AS rd_place FROM table_name_60 WHERE year = "1990" |
Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products. | SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products) |
List the id of students who registered course statistics in the order of registration date. | SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.registration_date |
What are the names of everybody who has exactly one friend? | SELECT name FROM PersonFriend GROUP BY name HAVING count(*) = 1 |
What is the August 15, 2012 population when the population density of 2012 is 307? | SELECT MAX(population_august_15), _2012 FROM table_12496904_1 WHERE population_density_2012__km_2__ = 307 |
What race is on aug 4 with ron fellows? | SELECT race_title FROM table_name_24 WHERE drivers = "ron fellows" AND date = "aug 4" |
How many times did the word "grec" occur on the page titled "Àbac"? | SELECT T2.occurrences FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T3.title = 'Àbac' AND T1.word = 'grec' |
On what date did Dick Johnson with at Calder? | SELECT date FROM table_name_10 WHERE winner = "dick johnson" AND race_title = "calder" |
What is the time of the 100m freestyle event? | SELECT time FROM table_name_54 WHERE event = "100m freestyle" |
Who are the cast members of episode 3-04? | SELECT cast FROM table_2570269_3 WHERE episode__number = "3-04" |
What are the characters and duration of actors? | SELECT Character , Duration FROM actor |
What title did Mentuhotep IV have? | SELECT title FROM table_name_11 WHERE name = "mentuhotep iv" |
I want the years for marathon distance and wins of 3 | SELECT years FROM table_name_15 WHERE distance = "marathon" AND wins = 3 |
What is the number of students who have class senator votes in the spring election cycle? | SELECT count ( * ) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T2.Election_Cycle = "Spring" |
Name the 2nd leg for defence force | SELECT 2 AS nd_leg FROM table_name_61 WHERE team_2 = "defence force" |
Between 2011 to 2013, what is the average number of male Hispanic degree-seeking students at 2-year institutions who graduated within 150 percent of normal/expected time in United Education Institute-Huntington Park Campus? | SELECT AVG(T2.grad_150) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'United Education Institute-Huntington Park Campus' AND T2.year BETWEEN 2011 AND 2013 AND T2.gender = 'M' AND T2.race = 'H' |
What is the highest 3620 value with a 5432 of 5432 and a 15122 greater than 15122? | SELECT MAX(3620) FROM table_name_34 WHERE 5432 = 5432 AND 15122 > 15122 |
What is the lowest amount of gold for more than 16 silver? | SELECT MIN(gold) FROM table_name_14 WHERE silver > 16 |
What's the value for race 4 when race 3 is dns and race 2 is 27? | SELECT race_4 FROM table_name_55 WHERE race_3 = "dns" AND race_2 = "27" |
What is the type for a general programming and the owner tv kanal 5? | SELECT type FROM table_name_73 WHERE programming = "general" AND owner = "tv kanal 5" |
Which tournament had a performance of 1R in 2004 and 2R in 1998? | SELECT tournament FROM table_name_79 WHERE 2004 = "1r" AND 1998 = "2r" |
What are the address and phone number of the buildings managed by "Brenden"? | SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden" |
How many suppliers are there in the United States of America? | SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'USA' |
How many train stations are there? | SELECT count(*) FROM station |
Show names of shops and the carriers of devices they have in stock. | SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID |
What is the average laps for ralph firman with a grid of over 19? | SELECT AVG(laps) FROM table_name_32 WHERE driver = "ralph firman" AND grid > 19 |
On what dates were employees without the letter M in their first names hired? | SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%' |
How many faculty members participate in an activity? | SELECT count(DISTINCT FacID) FROM Faculty_participates_in |
Find the name of the person who has friends with age above 40 and under age 30? | SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30) |
What are the dates of those? | SELECT T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 |
Which shops run with no employees? Find the shop names | SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring) |
Name the number of poles for 15th position | SELECT COUNT(poles) FROM table_24466191_1 WHERE position = "15th" |
In which Tournament was Mansour Bahrami Eric Winogradsky | SELECT tournament FROM table_name_9 WHERE opponent_in_final = "mansour bahrami eric winogradsky" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.