sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
List out the phone number of the shipping company of order id 10296. | SELECT T2.Phone FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260 |
Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme. | SELECT T2.Name , T2.age , T3.Theme 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 ORDER BY T3.Theme ASC |
Which Drobo (2nd) has a Drobo S (2nd) of 5? | SELECT drobo__2nd_ FROM table_name_1 WHERE DROBO_S(2 AS nd) = 5 |
How many employees work for AdvertureWorks that is single? | SELECT COUNT(T1.BusinessentityID) FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'EM' AND T2.MaritalStatus = 'S' |
Which Position has a Round larger than 4, and a Player of patrick johnson? | SELECT position FROM table_name_45 WHERE round > 4 AND player = "patrick johnson" |
What Country has a Player with Playoff Money with a Score of 72-69-73-73=287? | SELECT country FROM table_name_8 WHERE money___$__ = "playoff" AND score = 72 - 69 - 73 - 73 = 287 |
Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ? | select t2.makeid , t2.make from cars_data as t1 join car_names as t2 on t1.id = t2.makeid where t1.horsepower > (select min(horsepower) from cars_data) and t1.cylinders < 4; |
Provide the locations and times of the events of app ID "8715964299802120000". | SELECT T1.longitude, T1.latitude, T1.timestamp FROM events AS T1 INNER JOIN app_events AS T2 ON T1.event_id = T2.event_id WHERE T2.app_id = 8715964299802120000 |
What were the average partial failures when the rocket was Ariane 5? | SELECT AVG(partial_failures) FROM table_name_87 WHERE rocket = "ariane 5" |
Please calculate the average total price of orders from Exoto Designs Vendor in 2005. | SELECT SUM(T2.quantityOrdered * T2.priceEach) / COUNT(T3.orderNumber) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber WHERE T1.productVendor = 'Exoto Designs' AND STRFTIME('%Y', T3.orderDate) = '2005' |
What is the number of region 4 for the series of the complete seventh series? | SELECT COUNT(region_4) FROM table_1337525_1 WHERE complete_series = "The Complete Seventh Series" |
Which Position has a Player of steve nemeth? | SELECT position FROM table_name_94 WHERE player = "steve nemeth" |
What is the fewest gold medals when the bronze medals is greater than 5? | SELECT MIN(gold) FROM table_name_49 WHERE bronze > 5 |
which vehicles got best time of day 1:17.17 | SELECT vehicle FROM table_20090682_4 WHERE best_time_of_day = "1:17.17" |
What is augusta's low rank? | SELECT MIN(rank) FROM table_name_58 WHERE location = "augusta" |
What date was the record 20–16? | SELECT date FROM table_name_38 WHERE record = "20–16" |
Show the start dates and end dates of all the apartment bookings made by guests with gender code "Female". | SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female" |
On which date was the opponent lamine ouahab? | SELECT date FROM table_name_92 WHERE opponent = "lamine ouahab" |
When olympikus is the main sponsor who is the secondary sponsor? | SELECT secondary_sponsor FROM table_187239_1 WHERE main_sponsor = "Olympikus" |
Find the name of the students and their department names sorted by their total credits in ascending order. | SELECT name , dept_name FROM student ORDER BY tot_cred |
What Try bonus has a Points against of 488? | SELECT try_bonus FROM table_name_61 WHERE points_against = "488" |
What is the roll number of Poroti school, which has a 6 decile? | SELECT roll FROM table_name_45 WHERE decile = "6" AND name = "poroti school" |
Who played on clay on 3 march 2012? | SELECT opponent FROM table_name_16 WHERE surface = "clay" AND date = "3 march 2012" |
Show names of cities and names of counties they are in. | SELECT T1.Name , T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID |
What is the names of movies whose created year is after all movies directed by Steven Spielberg? | SELECT title FROM Movie WHERE YEAR > (SELECT max(YEAR) FROM Movie WHERE director = "Steven Spielberg") |
Which Venue has a Result of won 5-4? | SELECT venue FROM table_name_65 WHERE result = "won 5-4" |
Which of the document is described with the prefix initial? | Document with type code APP is described with the prefix initial. | Whats is APP document description? | SELECT document_description FROM Document_Types WHERE document_type_code = "APP" |
When did elisabeth of valois die? | SELECT death FROM table_name_45 WHERE name = "elisabeth of valois" |
What was the result of round 2r? | SELECT outcome FROM table_11326124_3 WHERE round = "2R" |
How many coaches does each club has? List the club id, name and the number of coaches. | SELECT T1.club_id , T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id |
Who is the staff manager of the store with the most non-active customers? | SELECT T.first_name, T.last_name FROM ( SELECT T3.first_name, T3.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.store_id = T3.store_id WHERE T1.active = 0 GROUP BY T3.first_name, T3.last_name ) AS T ORDER BY T.num DESC LIMIT 1 |
What is the total enrollment of the aa IHSAA class? | SELECT COUNT(enrollment) FROM table_name_61 WHERE ihsaa_class = "aa" |
What was attendance on March 11, 1995? | SELECT MIN(attendance) FROM table_20745746_1 WHERE date = "March 11, 1995" |
Among the countries in the High income: OECD group whose currency unit is Euro, how many of them have a note on the series code SP.DYN.AMRT.FE? | SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.IncomeGroup = 'High income: OECD' AND T1.CurrencyUnit = 'Euro' AND T2.Seriescode = 'SP.DYN.AMRT.FE' |
What series was sorted at number 3? | SELECT series_sorted FROM table_1620397_5 WHERE _number = 3 |
Which Chinese has a Pali of atappa? | SELECT chinese FROM table_name_59 WHERE pali = "atappa" |
List all the authors named "George". | SELECT author_name FROM author WHERE author_name LIKE 'George%' |
For the employee who has been hired the latest, what is his or her pay rate? | SELECT T1.Rate FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T2.HireDate DESC LIMIT 1 |
What is the average age of the members of the club "Bootup Baltimore"? | SELECT avg(t3.age) 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" |
What is the cyrillic name other names for the settlement of debeljača? | SELECT cyrillic_name_other_names FROM table_2562572_43 WHERE settlement = "Debeljača" |
What result occurs when the round is 4 leg 2? | SELECT result FROM table_name_87 WHERE round = "4 leg 2" |
What is the smallest total for a rank below 4, 0 silver medals, and 2 gold medals? | SELECT MIN(total) FROM table_name_85 WHERE rank < 4 AND silver > 0 AND gold < 2 |
What is the language ID of the movie "Walk the Line"? | SELECT T2.language_id FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Walk the Line' |
What is the maximum, minimum and average years spent working on a school bus? | SELECT MAX(years_working), MIN(years_working), AVG(years_working) FROM school_bus |
What are the names and job titles of every person ordered alphabetically by name? | SELECT name , job FROM Person ORDER BY name |
What are the results for Bill Shuster? | SELECT results FROM table_name_71 WHERE incumbent = "bill shuster" |
What was the genre of Queen (an artist from the United Kingdom)? | SELECT genre FROM table_name_47 WHERE country_of_origin = "united kingdom" AND artist = "queen" |
Show the average room count of the apartments that have booking status code "Provisional". | SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional" |
What is the total revenue of all companies whose main office is at Tokyo or Taiwan? | SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan' |
what is the brand name of id 2 ? | Did you mean the brand or name of the camera lens with ID 2? | yes | SELECT brand FROM camera_lens where id = 2 |
who was the trofeo fast team in stage 10? | SELECT trofeo_fast_team FROM table_name_32 WHERE stage = "10" |
What is the tenure of the person with revenues of 60,000-->58,000 koku? | SELECT tenure FROM table_name_90 WHERE revenues = "60,000-->58,000 koku" |
List down the revision page id of titles where "fresc" appears. | SELECT T3.revision 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 T1.word = 'fresc' |
Which club has a try bonus of 9 and 43 tries against? | SELECT club FROM table_name_38 WHERE tries_against = "43" AND try_bonus = "9" |
What is the high grid for ferrari's with 2 laps? | SELECT MAX(grid) FROM table_name_45 WHERE constructor = "ferrari" AND laps = 2 |
What is the average no opinion score during 1954 November that is more favorable than 35? | SELECT AVG(no_opinion) FROM table_name_94 WHERE date = "1954 november" AND favorable > 35 |
List the organisation id with the maximum outcome count, and the count. | SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1 |
How many games are played for all students? | SELECT sum(gamesplayed) FROM Sportsinfo |
When is the completed date of the destroyer with a pennant number h59? | SELECT completed FROM table_name_50 WHERE pennant_number = "h59" |
Show paragraph details for paragraph with text 'Korea ' . | select other_details from paragraphs where paragraph_text like 'korea' |
How many people attended the game at Jahn-sportpark? | SELECT MIN(attendance) FROM table_24786958_2 WHERE game_site = "Jahn-Sportpark" |
what is the score for the dams? | SELECT points FROM table_10705060_1 WHERE team_name = "DAMS" |
Show the account name, id and the number of transactions for each account. | SELECT T2.account_name , T1.account_id , count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id |
What region has 0.3% solar panel? | SELECT region FROM table_25042332_26 WHERE solar_panel = "0.3%" |
Which Bask has Soft of 18, and a Total larger than 35? | SELECT AVG(bask) FROM table_name_17 WHERE soft = "18" AND total > 35 |
What is the longitude for the Township that has a ANSI code less than 1036534, a water (sqmi) of 0, and a GEO ID greater than 3809959540? | SELECT COUNT(longitude) FROM table_name_20 WHERE ansi_code < 1036534 AND water__sqmi_ = 0 AND geo_id > 3809959540 |
How many degrees did "San Jose State University" confer in 2001? | SELECT sum ( degrees ) FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Jose State University" AND t2.year = 2001 |
What is the notes for the team from Denmark? | SELECT notes FROM table_name_48 WHERE country = "denmark" |
List the award name and persons who won the award in 2009. | SELECT award, person FROM Award WHERE result = 'Winner' AND SUBSTR(year, 1, 4) = '2009'; |
Which year had UTC as the runner-up and Saint-Gaudens Bears as the winners? | SELECT year FROM table_name_3 WHERE runner_up = "utc" AND winners = "saint-gaudens bears" |
Where did adrian smith go to college? | SELECT team_school FROM table_26916717_1 WHERE name = "Adrian Smith" |
Give the names of countries that are in Europe and have a population equal to 80000. | SELECT Name FROM country WHERE continent = "Europe" AND Population = "80000" |
Could you add in their departments please? | SELECT T1.first_name , T1.last_name , T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id |
What is the catalog number of the title called "super callanetics"? | SELECT catalog_number FROM table_11222744_3 WHERE title = "Super Callanetics" |
What percentage of the votes in Copiah did McCain get? | SELECT mccain_percentage FROM table_20799587_1 WHERE county = "Copiah" |
what is the owner name of CCTV-1 | SELECT owner from channel where name = "CCTV-1" |
Which Away team has a Venue of arden street oval? | SELECT away_team FROM table_name_32 WHERE venue = "arden street oval" |
Who has a time of 3:50.90? | SELECT name FROM table_name_35 WHERE time = "3:50.90" |
What is the series 3 with more than 4 seats? | SELECT series_3 FROM table_name_77 WHERE seat > 4 |
What date was the game score w 104-98? | SELECT date FROM table_27882867_9 WHERE score = "W 104-98" |
Who is the guard for Wisconsin? | SELECT player FROM table_name_44 WHERE position = "guard" AND school = "wisconsin" |
For every student who is registered for some course, how many courses are they registered for? | SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id |
What are the top three universities with the most international students? | SELECT DISTINCT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id GROUP BY T2.university_name ORDER BY SUM(T1.num_students * T1.pct_international_students / 100) DESC LIMIT 3 |
What are the L2 cache specifications of part number amql64dam22gg? | SELECT l2_cache FROM table_27277284_27 WHERE order_part_number = "AMQL64DAM22GG" |
What is the production code for season episode 8? | SELECT MIN(production_code) FROM table_13505192_3 WHERE season_number = 8 |
How many papers are "Atsushi Ohori" the author of? | SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Atsushi" AND t1.lname = "Ohori" |
What is the customer name of customer id 9? | SELECT customer_name FROM Customers WHERE customer_id = 9 |
what is the highest round when the college is penn state? | SELECT MAX(round) FROM table_name_72 WHERE college = "penn state" |
Which is the city where most of the 1 star reviews come from? | SELECT T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 1 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1 |
what city scored 0:0 | SELECT city FROM table_name_78 WHERE results¹ = "0:0" |
Show all distinct publishers for books. | SELECT DISTINCT publisher FROM book_club |
Please show different denominations and the corresponding number of schools in descending order. | SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC |
What is the default desktop environment when the edition is kde and the compatible repository is ubuntu 13.04? | SELECT default_desktop_environment FROM table_27329061_2 WHERE edition = "KDE" AND compatible_repository = "Ubuntu 13.04" |
Name the call sign for ERP W of 4 | SELECT call_sign FROM table_name_20 WHERE erp_w = 4 |
What school is located in Michigan City? | SELECT school FROM table_name_37 WHERE location = "michigan city" |
Where can I get the demographic information about the Valley Bicycle Specialists store? | SELECT Demographics FROM Store WHERE Name = 'Valley Bicycle Specialists' |
What is the event that is in 8th position? | SELECT event FROM table_name_70 WHERE position = "8th" |
What was the score when there was a visitor of Magic and at home with the Clippers? | SELECT score FROM table_name_54 WHERE visitor = "magic" AND home = "clippers" |
Give me the issue date of the volume with the minimum weeks on top | SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1 |
Show me all the employees in the same department as Clara. | Here is all the information of all the employees in the same department as the employee with a first name Clara. | Can you show me their hire dates? | SELECT hire_date FROM employees WHERE department_id = ( SELECT department_id FROM employees WHERE first_name = "Clara" ) |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.