sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Among the institutes in the state of Alabama whose percent rank for median SAT value within sector is 77, how many of them have over 500 graduates in total in 2011? | SELECT COUNT(DISTINCT T1.chronname) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.state = 'Alabama' AND T1.med_sat_percentile = '100' AND T2.year = 2011 AND T2.grad_cohort > 500 |
What was gary player's score? | SELECT score FROM table_name_25 WHERE player = "gary player" |
on what day was it? | Did you mean the day of week in weekly weather table | Yes, in what say was the maximum low temperature in Amersham station. | SELECT t1.day_of_week FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = "Amersham" order by low_temperature desc limit 1 |
In how many games did player Id "vernomi01" end up with a tie or an overtime loss in the 1998 season? | SELECT `T/OL` FROM Goalies WHERE playerID = 'vernomi01' AND year = 1998 |
Which mountain range has a rank of 19? | SELECT mountain_range FROM table_name_35 WHERE rank = 19 |
Which away team goes against the home team Mauritius? | SELECT away_team FROM table_name_94 WHERE home_team = "mauritius" |
Show the phone, room, and building for the faculty named Jerry Prince. | SELECT phone , room , building FROM Faculty WHERE Fname = "Jerry" AND Lname = "Prince" |
How many accounts do we have? | SELECT count(*) FROM Accounts |
Can you show me the maximum enrollment of all schools? | SELECT max ( enrollment ) FROM school |
Can you tell me the Co-driver that has the Year smaller than 2012, and the Laps smaller than 161, and the Position of dnf, and the Number 33? | SELECT co_driver FROM table_name_1 WHERE year < 2012 AND laps < 161 AND position = "dnf" AND number = 33 |
What are the id and details of the customers who have at least 3 events? | SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3 |
How many episodes have not won any Law & Order series awards? | SELECT COUNT(award_id) FROM Award WHERE Result = 'Nominee' |
What is the coinage metal for KM numbers of S45? | SELECT coinage_metal FROM table_26336060_19 WHERE km_number = "S45" |
What tournament was being played on August 11, 1984? | SELECT tournament FROM table_name_86 WHERE date = "august 11, 1984" |
What is the name of uid 1 ? | SELECT name FROM user_profiles where uid = 1 |
How many heads of the departments are older than 56 ? | SELECT COUNT(*) FROM head WHERE age > 56 |
What was the cargo value in 2005 for all product carriers? | SELECT 2005 FROM table_name_46 WHERE cargo = "all product carriers" |
Count the members of the club "Tennis Club". | SELECT count(*) 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 = "Tennis Club" |
List the ingredients which measure in slices. | SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T2.unit = 'slice(s)' |
Who published the title in the pet-raising simulator genre? | SELECT publisher FROM table_21458142_1 WHERE genre = "Pet-raising simulator" |
Find the names of all instructors who have taught some course and the course_id. | SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID |
What is the Date with an Opponent that is indiana state college? | SELECT date FROM table_name_71 WHERE opponent = "indiana state college" |
Which owner has the call sign of KDSU? | SELECT name FROM table_name_88 WHERE call_sign = "kdsu" |
Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | SELECT POSITION FROM pilot WHERE Join_Year < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year > 2005 |
What is the total attendance at games against the New York Mets with a record of 18-18? | SELECT COUNT(attendance) FROM table_name_76 WHERE opponent = "new york mets" AND record = "18-18" |
What are the names of representatives with more than 10000 votes in election? | SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000 |
What is the last name of the musician that have produced the most songs? | SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1 |
What is the language that was used most often in songs with resolution above 500? | SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1 |
What are all the policy types of the customer that has the most policies listed? | SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1) |
What is the response and number of inhabitants of the oldest female customer? | SELECT T2.RESPONSE, T3.INHABITANTS_K FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T1.SEX = 'Female' ORDER BY T1.age DESC LIMIT 1 |
What is 2005, when 2006 is "1R"? | SELECT 2005 FROM table_name_73 WHERE 2006 = "1r" |
Show the names of sponsors of players whose residence is either "Brandon" or "Birtle". | SELECT Sponsor_name FROM player WHERE Residence = "Brandon" OR Residence = "Birtle" |
who else along with scott dixon and graham rahal drove with the most speed | SELECT fastest_lap FROM table_13512105_3 WHERE most_laps_led = "Scott Dixon" AND pole_position = "Graham Rahal" |
In what order were the Bee Gees as the artist when it was a result of bottom 3? | SELECT order__number FROM table_name_30 WHERE result = "bottom 3" AND original_artist = "bee gees" |
What year was incumbent jim ramstad first elected? | SELECT MIN(first_elected) FROM table_1341423_23 WHERE incumbent = "Jim Ramstad" |
who is the leading scorer where home is charlotte bobcats | SELECT leading_scorer FROM table_11964047_5 WHERE home = "Charlotte Bobcats" |
Find the first names of the faculty members who participate in Canoeing and Kayaking. | 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 = 'Canoeing' INTERSECT 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 = 'Kayaking' |
Show names for all aircrafts of which John Williams has certificates. | SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = "John Williams" |
Which Stations are in vancouver, bc? | SELECT stations FROM table_name_64 WHERE city = "vancouver, bc" |
Great! Can you calculate for me the sum total of all Settlement Amounts and also the average Settlement Amount for all settlements? | SELECT sum ( settlement_amount ) , avg ( settlement_amount ) FROM settlements |
What are the names of all Statistics courses ? | SELECT title FROM course WHERE dept_name = "Statistics" |
With original artist of Tina Turner, what is the week number? | SELECT week__number FROM table_21501565_1 WHERE original_artist = "Tina Turner" |
Which flight carrier operator has the most cancelled flights? | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.CANCELLED DESC LIMIT 1 |
In Limerick County, what is the Rank with a Total larger than 12 and Tipperary as the Opposition? | SELECT AVG(rank) FROM table_name_48 WHERE opposition = "tipperary" AND county = "limerick" AND total > 12 |
Who was the opponent when the loss was Wells (4-7)? | SELECT opponent FROM table_name_35 WHERE loss = "wells (4-7)" |
What is the low point total when there are over 5 games? | SELECT MIN(points) FROM table_name_56 WHERE games > 5 |
What Entrepreneurs requested £60,000? | SELECT entrepreneur_s_ FROM table_name_27 WHERE money_requested__£_ = "60,000" |
Name all the trips where the bike was borrowed and returned on a different day. State the city where the bike was returned. | SELECT DISTINCT T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name WHERE SUBSTR(CAST(T2.start_date AS TEXT), INSTR(T2.start_date, '/') + 1) - SUBSTR(CAST(T2.start_date AS TEXT), INSTR(T2.start_date, ' ') - 5) <> SUBSTR(CAST(T2.end_date AS TEXT), INSTR(T2.end_date, '/') + 1) - SUBSTR(CAST(T2.end_date AS TEXT), INSTR(T2.end_date, ' ') - 5) |
Find the name of dorms which have TV Lounge but no Study Room as amenity. | SELECT T1.dorm_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 WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_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 WHERE T3.amenity_name = 'Study Room' |
Name the un region for 3314000 population | SELECT un_region FROM table_16278349_1 WHERE population = 3314000 |
Show all church names except for those that had a wedding in year 2015. | SELECT name FROM church EXCEPT SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id WHERE T2.year = 2015 |
Name the points for donald boor | SELECT points FROM table_25646820_2 WHERE player = "Donald Boor" |
List the vote ids, phone numbers and states of all votes. | SELECT vote_id , phone_number , state FROM votes |
Find the policy type used by more than 4 customers. | SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*) > 4 |
Please list all the games that have the same game genre as 3D Lemmings. | SELECT T1.game_name FROM game AS T1 WHERE T1.genre_id = ( SELECT T.genre_id FROM game AS T WHERE T.game_name = '3D Lemmings' ) |
Name the first citicality for electric power of 1,380 mw | SELECT first_criticality FROM table_name_3 WHERE electric_power = "1,380 mw" |
What's the duration of the Archers with Norman Painting as an actor? | SELECT duration FROM table_name_98 WHERE soap_opera = "the archers" AND actor = "norman painting" |
Which Year has a Competition of commonwealth youth games? | SELECT AVG(year) FROM table_name_94 WHERE competition = "commonwealth youth games" |
What is the loaction attendance that has a game greater than 35, with January 30 as the date? | SELECT location_attendance FROM table_name_24 WHERE game > 35 AND date = "january 30" |
what is the product category code for product name 'sesame' | select product_category_code from Products where product_name = 'sesame' |
How much money was spent when the amount after debt was $1,757,936? | SELECT money_spent, _3q FROM table_name_19 WHERE after_debt = "$1,757,936" |
What Date was the Country of japan, and a Label of sony? | SELECT date FROM table_name_75 WHERE country = "japan" AND label = "sony" |
how many publishers are there? | SELECT count ( distinct Publisher ) FROM publication |
In what year was Phil J. Welch first elected? | SELECT first_elected FROM table_1342198_25 WHERE incumbent = "Phil J. Welch" |
What is the number of career caps for a full back, when tour Apps is smaller than 29? | SELECT COUNT(career_caps) FROM table_name_78 WHERE position = "full back" AND tour_apps < 29 |
Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500? | SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500; |
show me the name of the users. | SELECT name FROM user_profiles |
What is the product name of order CA-2011-115791 in the East superstore? | SELECT DISTINCT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order ID` = 'CA-2011-141817' |
How many classes does the professor whose last name is Graztevski teach? | SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski' |
What types of documents are these? | SELECT document_type_code FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id |
Where was the race on 28 dec 2010 held? | SELECT location FROM table_name_69 WHERE date = "28 dec 2010" |
Which season did Jovy Sese play? | SELECT season FROM table_name_7 WHERE name = "jovy sese" |
What date was the Week 3 game played? | SELECT date FROM table_name_18 WHERE week = 3 |
Find the names of all reviewers who have contributed three or more ratings. | SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3 |
Describe Sales Representative names who were hired in 1992 and compare the number of orders among them. | SELECT T1.FirstName, T1.LastName, COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Title = 'Sales Representative' AND STRFTIME('%Y', T1.HireDate) = '1992' GROUP BY T1.EmployeeID, T1.FirstName, T1.LastName |
Among the films starred by Angelina Astaire, what is the title of the film with a replacement cost of 27.99? | SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Angelina' AND T1.last_name = 'Astaire' AND T3.replacement_cost = 27.99 |
What was the attendance in the gave versus the Brewers with a score of 9–6? | SELECT attendance FROM table_name_43 WHERE opponent = "brewers" AND score = "9–6" |
What are the student class and gpa of each of those students? | SELECT stu_class, stu_GPA FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' |
Who had the high points when the score was w 112-110? | SELECT high_points FROM table_27902171_7 WHERE score = "W 112-110" |
show all the skill descriptions. | SELECT skill_description FROM skills |
what is the pole position of Round 9 | SELECT pole_position FROM table_name_4 WHERE round = 9 |
How many flights operated by American Airlines Inc. on 2018/8/1 were faster than scheduled? | SELECT SUM(CASE WHEN T2.ACTUAL_ELAPSED_TIME < CRS_ELAPSED_TIME THEN 1 ELSE 0 END) AS count FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1' AND T3.Description = 'American Airlines Inc.: AA' |
How many courses have more than 2 credits? | SELECT COUNT(*) FROM COURSE WHERE Credits > 2 |
Tell me the affiliation for pick number less than 59 and position of gk | SELECT affiliation FROM table_name_33 WHERE pick__number < 59 AND position = "gk" |
How many main wins for France? | SELECT main_wins FROM table_name_63 WHERE team = "france" |
What is the minimum number of opponents' points for the game at Michigan State? | SELECT MIN(opponents) FROM table_24560733_1 WHERE opponent = "at Michigan State" |
How many figures are given for total number of South Asians in 2001 for the area where they were 4.4% of population in 2011? | SELECT COUNT(south_asians_2001) FROM table_1717824_1 WHERE _percentage_2011 = "4.4%" |
What is every TV network in Belgium? | SELECT tv_network_s_ FROM table_18821196_1 WHERE country = "Belgium" |
What is the Capacity in use with an Annual change that is 21.8%? | SELECT capacity_in_use FROM table_name_31 WHERE annual_change = "21.8%" |
Which arena was founded in 2000? | SELECT arena FROM table_name_5 WHERE founded = 2000 |
What circut has an unknown fastest lap on July 19? | SELECT circuit FROM table_name_76 WHERE fastest_lap = "unknown" AND date = "july 19" |
Provide the price and country origin of the car named Ford Maverick. | SELECT DISTINCT T1.price, T3.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T4.car_name = 'ford maverick' |
Who was the Opponent in the Auckland, New Zealand Tournament? | SELECT opponent FROM table_name_50 WHERE tournament = "auckland, new zealand" |
how many order id from order item id 2 | SELECT count ( * ) FROM order_items where order_item_id = 2 |
What is the name of the player picked before round 2? | SELECT player FROM table_name_75 WHERE round < 2 |
How many accelerators are not compatible with the browsers listed ? | SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser) |
What state is that in? | SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = "FJA Filming" |
what was the name of the episode that got 3.3 (millions) of u.s viewers? | SELECT title FROM table_21313327_1 WHERE us_viewers__millions_ = "3.3" |
What are the names of instructors who have taught C Programming courses? | SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming' |
What was the attendance at the Billericay Town home game? | SELECT attendance FROM table_name_51 WHERE home_team = "billericay town" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.