sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What are the names of the states whose postal point is not affiliated with any organization? | SELECT DISTINCT T2.name FROM zip_data AS T1 INNER JOIN state AS T2 ON T1.state = T2.abbreviation WHERE T1.division IS NULL |
What is the date of the munich, germany tournament? | SELECT date FROM table_name_52 WHERE tournament = "munich, germany" |
Can you tell me the Team that has the High rebounds of antawn jamison (10), and the Date of november 5? | SELECT team FROM table_name_91 WHERE high_rebounds = "antawn jamison (10)" AND date = "november 5" |
What is the amount of customers of 1957 Chevy Pickup by customers in a month? | SELECT COUNT(T2.customerNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.productCode IN ( SELECT productCode FROM products WHERE productName = '1957 Chevy Pickup' ) |
What are the names, ages, and countries of artists, sorted by the year they joined? | SELECT name , age , country FROM artist ORDER BY Year_Join |
What was the issue price in the year 2008? | SELECT SUM(issue_price) FROM table_name_29 WHERE year = 2008 |
Episode smaller than 210 had what segment c? | SELECT segment_c FROM table_name_67 WHERE episode < 210 |
Please give me a list of cities whose regional population is over 8000000 or under 5000000. | SELECT city FROM city WHERE regional_population > 8000000 UNION SELECT city FROM city WHERE regional_population < 5000000 |
On what Date did the Away team essendon play? | SELECT date FROM table_name_11 WHERE away_team = "essendon" |
Name the order in office for spiro agnew | SELECT order_in_office FROM table_2026548_1 WHERE vice_president = "Spiro Agnew" |
Which vendor's selling price for Hex Nut 5 is the lowest, please give the vendor's name. | SELECT T3.Name FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T2.Name = 'Hex Nut 5' ORDER BY T1.StandardPrice LIMIT 1 |
What is the average unit price of AKJ Books items? | SELECT SUM(item_unit_price) / SUM(item_quantity) FROM resources WHERE vendor_name = 'AKJ Books' |
What was the largest number of people in attendance of the game with a W 14-3 result after week 10? | SELECT MAX(attendance) FROM table_name_10 WHERE result = "w 14-3" AND week > 10 |
List the names of all the universities that have no less than 50,000 students in the year 2012. | SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.num_students > 50000 AND T1.year = 2012 |
Which country is Lemd the ICAO of? | SELECT country FROM table_name_34 WHERE icao = "lemd" |
What Date is listed for the Region of France and Catalog of 82876-70291-2? | SELECT date FROM table_name_48 WHERE region = "france" AND catalog = "82876-70291-2" |
How many memberships do these branches have? | SELECT membership_amount FROM branch ORDER BY membership_amount DESC LIMIT 3 |
What are the theme and year for all exhibitions that have a ticket price under 15? | SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15 |
Can you add to the table the forenames and surnames associated with each driver id? | SELECT driverId, forename, surname FROM drivers |
What year did Naushad Direct the Music? | SELECT MAX(year) FROM table_2528382_5 WHERE music_director = "Naushad" |
How many wins for the team with fewer than 2 byes? | SELECT AVG(wins) FROM table_name_1 WHERE byes < 2 |
What was the partner count when the opponents in the final was forget leconte? | SELECT COUNT(partner) FROM table_22597626_17 WHERE opponents_in_the_final = "Forget Leconte" |
How many shipments by truck were made? | SELECT COUNT(*) FROM ShipMethod AS T1 INNER JOIN SalesOrderHeader AS T2 USING (ShipMethodID) WHERE T1.Name = 'XRQ - TRUCK GROUND' |
What are the ids of the students who are under 20 years old and are involved in at least one activity. | SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20 |
Where was the game with a higher score than 1 played? | SELECT venue FROM table_name_85 WHERE scored > 1 |
How many distinct birth places are there? | SELECT count(DISTINCT Birth_Place) FROM people |
What was the match points score for the match won by Connacht? | SELECT match_points FROM table_28068063_2 WHERE winners = "Connacht" |
What is the highest number of silver medals for a team with total less than 1? | SELECT MAX(silver) FROM table_name_32 WHERE total < 1 |
Which teams had the most postseason empty net goals in 2010 season? List their team names. | SELECT T2.name FROM Goalies AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID WHERE T1.year = 2010 GROUP BY T2.name ORDER BY SUM(PostENG) DESC LIMIT 1 |
How many people live in countries that do not speak English? | SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English") |
Show the id and name of the aircraft with the maximum distance. | SELECT aid , name FROM Aircraft ORDER BY distance DESC LIMIT 1 |
What is the address of the driver that delivers the shipment for the customer lives at 7052 Carroll Road, San Diego, California? | SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'San Diego' AND T2.state = 'CA' |
How many bronzes did netherlands win? | SELECT bronze FROM table_name_9 WHERE nation = "netherlands" |
Which lowest period's element is ruthenium? | SELECT MIN(period) FROM table_name_28 WHERE element = "ruthenium" |
What is the number of ships? | SELECT count(*) FROM ship |
What about in the spring semester? | SELECT name FROM student WHERE id IN ( SELECT id FROM takes WHERE semester = 'Spring' AND YEAR = 2003 ) |
What is the Format of the Frequency owned by Laval University? | SELECT format FROM table_name_96 WHERE owner = "laval university" |
What are the names of entrepreneurs? | SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID |
How many Folsom customers prefer to pay with Visa? | SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.City = 'Folsom' AND T2.CreditCardType = 'Visa' |
Calculate the ratio between unemployed students and disabled students. | SELECT CAST(( SELECT COUNT(name) FROM unemployed ) AS REAL ) / ( SELECT COUNT(name) FROM disabled ) |
What was the Time in the Mina Clavero 2 Stage? | SELECT time FROM table_name_74 WHERE name = "mina clavero 2" |
Show the premise type and address type code for all customer addresses. | SELECT T2.premises_type , T1.address_type_code FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id |
In which tournament was the 2012 result 1r and the 2013 result 3r? | SELECT tournament FROM table_name_31 WHERE 2012 = "1r" AND 2013 = "3r" |
What is the height of the player who attended Hartford? | SELECT height_in_ft FROM table_11734041_2 WHERE school_club_team_country = "Hartford" |
How many losses altogether were had by teams that won 12 times, had 40-4 points, and more than 57 goals? | SELECT SUM(losses) FROM table_name_11 WHERE wins = 12 AND points = "40-4" AND goals_for > 57 |
Show all statement id and the number of accounts for each statement. | SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID |
What is Original Album, when Time is "3:39"? | SELECT original_album FROM table_name_23 WHERE time = "3:39" |
What round was a loss with a record of 12-3? | SELECT round FROM table_name_22 WHERE res = "loss" AND record = "12-3" |
What is the package/option in Italy when the content is religione? | SELECT package_option FROM table_name_68 WHERE content = "religione" AND country = "italy" |
How many patents outcomes were listed for all the projects? | SELECT count(*) FROM Project_outcomes WHERE outcome_code = 'Patent' |
What was the 2008 election status when glenn nye was the running democrat? | SELECT 2008 AS _status FROM table_17503169_1 WHERE democratic = "Glenn Nye" |
Name the total number of average for wickets less than 265, runs less than 4564 and matches less than 52 | SELECT COUNT(average) FROM table_name_99 WHERE matches < 52 AND runs < 4564 AND wickets < 265 |
what is the average rank when the cyclist is alexandr pliuschin? | SELECT AVG(rank) FROM table_name_71 WHERE cyclist = "alexandr pliuschin" |
List the criteria names under the ranking system called Center for World University Ranking. | SELECT T2.criteria_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Center for World University Rankings' |
What is the lowest number of last cfs of the team with 2 cf appearances, 0 cup wins, and less than 0 cf wins? | SELECT MIN(last_cf) FROM table_name_90 WHERE cf_appearances = 2 AND cup_wins = 0 AND cf_wins < 0 |
What's the percentage when the state delegate is 1662? | SELECT percentage FROM table_16186152_1 WHERE state_delegate = 1662 |
For each grade 0 classroom, report the total number of students. | SELECT classroom , count(*) FROM list WHERE grade = "0" GROUP BY classroom |
Show the names of people who have been on the negative side of debates at least twice. | SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative = T2.People_ID GROUP BY T2.Name HAVING COUNT(*) >= 2 |
What are the changes (2010 to 2011) where the International Tourist Arrivals is 1.7 million? | SELECT change__2010_to_2011_ FROM table_14752049_2 WHERE international_tourist_arrivals__2011_ = "1.7 million" |
Who is the away team for the tome team Leeds United, at the League Cup Competition? | SELECT away_team FROM table_name_12 WHERE home_team = "leeds united" AND competition = "league cup" |
Which Attendance is the highest one that has a Week smaller than 9, and a Result of l 24–23? | SELECT MAX(attendance) FROM table_name_27 WHERE week < 9 AND result = "l 24–23" |
In 1987, what is the Runners-up when Stefan Edberg is Champion? | SELECT runners_up FROM table_name_95 WHERE champions = "stefan edberg" AND year = 1987 |
Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types. | SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full' |
Which problem log was created most recently? Give me the log id. | SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1 |
When did the duchess who became duchess on 7/8 April 1766 cease to be duchess? | SELECT ceased_to_be_duchess FROM table_name_5 WHERE became_duchess = "7/8 april 1766" |
What was the highest grid for Patrick Carpentier? | SELECT MAX(grid) FROM table_name_77 WHERE driver = "patrick carpentier" |
List any five of course IDs with professor IDs who taught master courses. | SELECT T1.course_id, T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_500' LIMIT 5 |
What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010? | SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 |
Which professor advised Willie Rechert to work as a research assistant? Please give his or her full name. | SELECT T1.first_name, T1.last_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Willie' AND T3.l_name = 'Rechert' |
What was roberto travern's record when he fought against john salter? | SELECT record FROM table_name_60 WHERE opponent = "john salter" |
When was the satellite that has a COSPAR ID of 1967-042a launched? | SELECT launch_date FROM table_name_80 WHERE cospar_id = "1967-042a" |
Who is the founders of companies whose first letter is S? | SELECT founder FROM manufacturers WHERE name LIKE 'S%' |
What is the least common product category code? | SELECT product_category_code from Products group by product_category_code order by count ( * ) limit 1 |
What was the latest week that had a game on November 18, 1951? | SELECT MAX(week) FROM table_name_91 WHERE date = "november 18, 1951" |
Which department has the largest number of employees? | SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1; |
How many 'blue' attribute classes are there on image ID 2355735? | SELECT COUNT(T1.ATT_CLASS) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 2355735 AND T1.ATT_CLASS = 'blue' |
What are the brands of the root beers that received 5-star ratings from no less than 5 customers? | SELECT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 GROUP BY T2.BrandID HAVING COUNT(T2.StarRating) >= 5 |
How many students belong to the navy department? | SELECT COUNT(name) FROM enlist WHERE organ = 'navy' |
What is the suriname with a 16.8% brokopondo? | SELECT suriname FROM table_name_62 WHERE brokopondo = "16.8%" |
During all the observations of Elly Koss, what was the highest Systolic Blood Pressure observed? | SELECT T2.value, T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Systolic Blood Pressure' ORDER BY T2.VALUE DESC LIMIT 1 |
What is Vuelta a Ecuador's lowest UCI Rating? | SELECT MIN(uci_rating) FROM table_name_3 WHERE race_name = "vuelta a ecuador" |
What is the name of the store in district 11? | SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_id = 11 |
I want the cast for director of colbert clark and armand schaefer for burn 'em up barnes | SELECT cast FROM table_name_75 WHERE director = "colbert clark and armand schaefer" AND serial_title = "burn 'em up barnes" |
What is the number of goals against when the played is more than 38? | SELECT COUNT(goals_against) FROM table_name_19 WHERE played > 38 |
Which countries do the top 5 highest paying customers in a single payment come from? Indicate their entire address. | SELECT DISTINCT T2.country, T2.addressLine1, T2.addressLine2 FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber ORDER BY T1.amount DESC LIMIT 5 |
Did the round 8 race get reported | SELECT report FROM table_15511178_3 WHERE rd = 8 |
Please show the software platforms of devices in descending order of the count. | SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC |
What the college Charles is attending? | SELECT T1.cName FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles' |
What is the number for the international with 669 domestic earlier than 2005? | SELECT AVG(international) FROM table_name_78 WHERE domestic = 669 AND year < 2005 |
The lake with the highest altitude is located in which city? | SELECT T2.City FROM lake AS T1 LEFT JOIN located AS T2 ON T2.Lake = T1.Name ORDER BY T1.Altitude DESC LIMIT 1 |
Which Sleeves have a Year of 2006-2008? | SELECT sleeves FROM table_name_67 WHERE year = "2006-2008" |
Find the role, street, city and state of the professionals living in a city that contains the substring 'West'. | SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%' |
Show me the medicine name which can interact as 'activitor' with enzymes? | SELECT T1.name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor' |
How many people who are below 30 and participated in the summer season? | SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' AND T2.age < 30 |
Hi, could you find the appellations that produce wines after the year of 2008 but not in Central Coast area. | SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast" |
Find the name of customers whose credit score is below the average credit scores of all customers. | SELECT cust_name FROM customer WHERE credit_score < (SELECT avg(credit_score) FROM customer) |
Which Record has a Game larger than 15, and Points smaller than 31, and a November of 7? | SELECT record FROM table_name_36 WHERE game > 15 AND points < 31 AND november = 7 |
If the race time is 2:00:33, what is the average speed? | SELECT average_speed__mph_ FROM table_2260452_1 WHERE race_time = "2:00:33" |
Name the 2005 with 2007 of sf | SELECT 2005 FROM table_name_16 WHERE 2007 = "sf" |
Find the first name and age of the students who are playing both Football and Lacrosse. | SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.