sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What was the time when Shinya Aoki was the opponent? | SELECT time FROM table_name_57 WHERE opponent = "shinya aoki" |
Names of browsers that are compartable with cachebox? | SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' |
What are the id of students who registered courses or attended courses? | SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance |
What are the names of all enzymes that can serve as inhibitors? | SELECT distinct ( T1.name ) FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T2.interaction_type = 'inhibitor' |
How many friends does Dan have? | SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan' |
Which schools have goalie player? | SELECT cName FROM tryout WHERE pPos = "goalie" |
Find the name of rooms booked by some customers whose first name contains ROY. | SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%' |
How many people played at the club that had a "goal difference" of -8 and a position lower than 12? | SELECT SUM(played) FROM table_name_80 WHERE goal_difference = -8 AND position < 12 |
Find the names of stores whose number products is more than the average number of products. | SELECT name FROM shop WHERE number_products > (SELECT AVG(number_products) FROM shop) |
List the dishes included on page number 30 with the least in full height. | SELECT T3.name FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T1.page_number = 30 ORDER BY T1.full_height DESC, T1.full_height ASC LIMIT 1 |
Among the companies to which Adventure Works Cycles purchases parts or other goods, what is the profit on net obtained from the vendor who has an above average credit rating? Kindly indicate each names of the vendor and the corresponding net profits. | SELECT T2.Name, T1.LastReceiptCost - T1.StandardPrice FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.CreditRating = 3 |
what is the natural change (per 1000) when the crude death rate (per 1000) is 10? | SELECT natural_change__per_1000_ FROM table_name_61 WHERE crude_death_rate__per_1000_ = 10 |
Where did he finish when he started at 21.6? | SELECT COUNT(finish) FROM table_2649597_1 WHERE start = "21.6" |
Who is fourth when Anders Martinson USA is second? | SELECT fourth FROM table_name_98 WHERE second = "anders martinson usa" |
How many faculty members do we have for each faculty rank? | SELECT rank , count(*) FROM Faculty GROUP BY rank |
What Position has a Round that's larger than 21? | SELECT position FROM table_name_86 WHERE round > 21 |
What is the alias of the city called Hartford? | SELECT DISTINCT T2.alias FROM zip_data AS T1 INNER JOIN alias AS T2 ON T1.zip_code = T2.zip_code WHERE T1.city = 'Hartford' |
What is the name of the network in the United Kingdom which aired in 1985–1992? | SELECT network FROM table_name_44 WHERE region_country = "united kingdom" AND dates_aired = "1985–1992" |
Show id,first and last names for all customers with at least two cards? | SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count ( * ) > = 2 |
In the Tournament during which Jiří Novák made it to the 1st round(1R) in 1995, how did he do in 2001? | SELECT 2001 FROM table_name_32 WHERE 1995 = "1r" |
Find the number of students for each department. | SELECT count(*) , dept_code FROM student GROUP BY dept_code |
Tell me the WL doubles with a debut of 1999 | SELECT w_l__doubles_ FROM table_name_73 WHERE debut = 1999 |
What is the Result of the game with an Attendance of 64,104? | SELECT result FROM table_name_25 WHERE attendance = "64,104" |
Who has a total of the Bronze less than 4, gold more than 0, and no silver? | SELECT SUM(bronze) FROM table_name_30 WHERE total < 4 AND gold > 0 AND silver = 0 |
What is the Location when the opponent shows vs. ole miss, and a Loss of mckean (4-1)? | SELECT location FROM table_name_41 WHERE opponent = "vs. ole miss" AND loss = "mckean (4-1)" |
What are the work type of Kamila Porczyk? | SELECT T1.Work_Type FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T2.Name = "Kamila Porczyk" |
How many disabled students are male? | SELECT COUNT(T1.name) FROM male AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name |
What are the names of students who have more than one advisor? | SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING count(*) > 1 |
Find the names of the items that did not receive any review. | SELECT title FROM item WHERE NOT i_id IN (SELECT i_id FROM review) |
Hello, how many total documents are there? | select count ( * ) from documents |
what is the least number of goals for when the goals against is 70 and the ties less than 0? | SELECT MIN(goals_for) FROM table_name_32 WHERE goals_against = 70 AND ties < 0 |
Great! Can you update this list to include the average roller coaster speed for each of these three countries? | SELECT T1.Name , avg ( T2.Speed ) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name |
What region has the catalog sir021-6? | SELECT region FROM table_name_93 WHERE catalog = "sir021-6" |
How many votes were cast in Wayne county? | SELECT MAX(total__number) FROM table_13625792_1 WHERE county = "Wayne" |
Who were the cover model(s) on the 4-05 issue? | SELECT cover_model FROM table_1566852_6 WHERE date = "4-05" |
Who was the turbine manufacturer for the Wheatland county? | SELECT turbine_manufacturer FROM table_24837750_1 WHERE county = "Wheatland" |
What is the biggest number of females where the males are at 28.2 with a rank greater than 5? | SELECT MAX(females) FROM table_name_46 WHERE males = 28.2 AND rank > 5 |
Who is the player from round 13 that plays center? | SELECT player FROM table_name_47 WHERE round = 13 AND position = "center" |
Write the names of the podcasts in the music category that have a rating greater than 3. | SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'music' AND T2.rating > 3 |
What is the sum of all points when number played is less than 18? | SELECT SUM(points) FROM table_name_40 WHERE played < 18 |
Find the phone number of all the customers and staff. | SELECT phone_number FROM customers UNION SELECT phone_number FROM staff |
What place has a draw smaller than 2? | SELECT AVG(place) FROM table_name_90 WHERE draw < 2 |
what is the average attendance of Cowboys Stadium | SELECT Average_Attendance FROM stadium WHERE name = "Cowboys Stadium" |
Show the name of track with most number of races. | SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1 |
Which opponent has September 14, 2003 as the date? | SELECT opponent FROM table_name_14 WHERE date = "september 14, 2003" |
What is the away team's score at princes park? | SELECT away_team AS score FROM table_name_49 WHERE venue = "princes park" |
Show the names of journalists FROM "England" or "Wales". | SELECT Name FROM journalist WHERE Nationality = "England" OR Nationality = "Wales" |
Show name, opening year, and capacity for each cinema. | SELECT name , openning_year , capacity FROM cinema |
What is the total number of students enrolled in schools without any goalies? | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie") |
What are project ids of projects that have 2 or more corresponding documents? | SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2 |
If the branding is Yes! FM 91.1 Boracay, what is the power? | SELECT power__kw_ FROM table_19874169_3 WHERE branding = "YES! FM 91.1 Boracay" |
What is the first name, last name, and phone of the customer with account name 162? | SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "162" |
what are their ids? | SELECT student_id FROM student_course_registrations GROUP BY student_id having count ( * ) = 1 |
What are the maximum, minimum and average home games each stadium held? | SELECT max(home_games) , min(home_games) , avg(home_games) FROM stadium |
What about faculty members who participate in Mountain Climbing? | SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Mountain Climbing' |
How many percent of domestic violence cases were arrested in West Pullman? | SELECT CAST(COUNT(CASE WHEN T2.arrest = 'TRUE' THEN T2.report_no END) AS REAL) * 100 / COUNT(T2.report_no) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T1.community_area_name = 'West Pullman' AND T2.domestic = 'TRUE' |
what's the district with first elected being 1972 | SELECT district FROM table_1341586_39 WHERE first_elected = 1972 |
How was the Temple of Artemis at Ephesus destroyed? | SELECT cause_of_destruction FROM table_19342760_1 WHERE name = "Temple of Artemis at Ephesus" |
Who had the high points when high assists is tim duncan (5)? | SELECT high_points FROM table_27715173_8 WHERE high_assists = "Tim Duncan (5)" |
What date has boston as the visitor? | SELECT date FROM table_name_21 WHERE visitor = "boston" |
Okay. How many races did he participate in? | SELECT count ( * ) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count ( * ) limit 1 |
Give the different hometowns of gymnasts that have a total point score of above 57.5. | SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5 |
For the city with the most elders, what's its area code? | SELECT T2.area_code FROM zip_data AS T1 INNER JOIN area_code AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.area_code ORDER BY T1.over_65 DESC LIMIT 1 |
Find the first name and country code of the oldest player. | SELECT first_name, country_code FROM players ORDER BY birth_date LIMIT 1 |
At what venue was the game played where the away team was South Melbourne | SELECT venue FROM table_name_49 WHERE away_team = "south melbourne" |
Who is the artist with catalog number ZK 34354? | SELECT artist FROM table_name_38 WHERE catalog__number = "zk 34354" |
On what date was their record 26-19? | SELECT date FROM table_name_70 WHERE record = "26-19" |
What is the unique id number identifying the onion object class? | SELECT OBJ_CLASS_ID FROM OBJ_CLASSES WHERE OBJ_CLASS = 'onion' |
What rocket has a COSPAR ID of 2002-001a? | SELECT rocket FROM table_name_31 WHERE cospar_id = "2002-001a" |
What is the event in a year before 1989? | SELECT event FROM table_name_37 WHERE year < 1989 |
Who is the kitmaker for TPS? | SELECT kitmaker FROM table_25129482_1 WHERE club = "TPS" |
Name the total number of years for usisl pro league | SELECT COUNT(year) FROM table_2511876_1 WHERE league = "USISL Pro league" |
How many different courses offered by Physics department? | SELECT count(DISTINCT course_id) FROM course WHERE dept_name = 'Physics' |
How many courses are provided in each semester and year? | SELECT count(*) , semester , YEAR FROM SECTION GROUP BY semester , YEAR |
In what city is the Estonian University of Life Sciences located? | SELECT city FROM table_name_42 WHERE name = "estonian university of life sciences" |
How many users were trialists when they rated the movie "A Way of Life"? | SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved' AND T1.user_trialist = 1 |
List the player's name of Mumbai Indians in the match ID 335990. | SELECT T3.Team_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T2.Player_Id = T1.Player_Id INNER JOIN Team AS T3 ON T3.Team_Id = T2.Team_Id WHERE T2.Match_Id = 335990 AND T3.Team_Name = 'Mumbai Indians' GROUP BY T3.Team_Name |
What is the total attendance of the match with a 1:2 score? | SELECT COUNT(attendance) FROM table_name_92 WHERE score = "1:2" |
What city ranked 7? | SELECT city FROM table_name_20 WHERE rank = 7 |
What is the name and dose of the medication? | SELECT distinct T4.Name, T3.Dose FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE T2.Name = 'John Smith' |
Which urban area has a 2011 population of 5010? | SELECT urban_area FROM table_1940144_1 WHERE population_2011 = 5010 |
Which Played has a Lost larger than 2, and a Team of américa? | SELECT played FROM table_name_4 WHERE lost > 2 AND team = "américa" |
How many have won at least two matches? | SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT ( * ) > = 2 |
Where was the ship when the ship had captured as the disposition of ship and was carrying 225 tonnage? | SELECT location FROM table_name_29 WHERE disposition_of_ship = "captured" AND tonnage = "225" |
Count the number of different ranks of captain. | SELECT count(DISTINCT rank) FROM captain |
What is the sum of Poles, when Podiums is 0, and when Races is 17? | SELECT SUM(poles) FROM table_name_35 WHERE podiums = 0 AND races = 17 |
What is the record on October 30? | SELECT record FROM table_name_74 WHERE date = "october 30" |
What is Thad Jemison's position? | SELECT position FROM table_name_85 WHERE player = "thad jemison" |
Name the D 41 √ for having D 43 of r 13 | SELECT d_41_√ FROM table_name_20 WHERE d_43_o = "r 13" |
What is the highest score of round 1 where they also shot 90 in round 2 | SELECT MAX(round_1) FROM table_14708760_3 WHERE round_2 = 90 |
Which country does Malina Johnson live in? | SELECT T4.country_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN country AS T4 ON T4.country_id = T3.country_id WHERE T1.first_name = 'Malina' AND T1.last_name = 'Johnson' AND T2.status_id = 2 |
Who scored the lowest with 8 gold medals and less than 4 silver medals? | SELECT MIN(total) FROM table_name_40 WHERE gold = 8 AND silver < 4 |
Name the film title for okkar á milli: í hita og þunga dagsins | SELECT film_title_used_in_nomination FROM table_name_98 WHERE original_name = "okkar á milli: í hita og þunga dagsins" |
What are the names of banks in the state of New York? | SELECT bname FROM bank WHERE state = 'New York' |
Which province is grey and bell electorate in | SELECT province FROM table_1024710_2 WHERE electorate = "Grey and Bell" |
Please list any three Wikipedia pages that are written in Catalan, together with their titles and revision page numbers. | SELECT title, revision FROM pages WHERE lid = 1 LIMIT 3 |
What is the average enrollment of schools? | SELECT avg(Enrollment) FROM school |
List out the category name of business id 5. | SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T2.business_id = 5 |
List each test result and its count in descending order of count. | SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC |
Which Goals For has a Played larger than 34? | SELECT MIN(goals_for) FROM table_name_86 WHERE played > 34 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.