sentence
stringlengths
3
347
sql
stringlengths
18
804
Name the years for spain with 215 goals
SELECT years FROM table_name_31 WHERE nationality = "spain" AND goals = 215
What is the average First year that has a Notes of replaced by us 12 when i-94 replaced us 12, and a Final year larger than 1961?
SELECT AVG(first_year) FROM table_name_31 WHERE notes = "replaced by us 12 when i-94 replaced us 12" AND final_year > 1961
What is the Root of All Evil with an Original air date that is september 3, 2008?
SELECT root_of_all_evil FROM table_name_33 WHERE original_air_date = "september 3, 2008"
WHich Position has a Player of david laliberte?
SELECT position FROM table_name_50 WHERE player = "david laliberte"
Which Oricon has a Romaji title of nakitakunalu?
SELECT MAX(oricon) FROM table_name_17 WHERE romaji_title = "nakitakunalu"
What tournament or series was played in England, when games played was 4, points for were 121?
SELECT tournament_or_series FROM table_name_15 WHERE played_in = "england" AND games_played___tests__ = "4" AND points_for___tests__ = "121"
Show location and name for all stadiums with a capacity between 5000 and 10000.
SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000
What is the launched date for the Harusame ship?
SELECT launched FROM table_name_18 WHERE name = "harusame"
What was the score when 7260 people attended the game?
SELECT score FROM table_20745746_1 WHERE attendance = 7260
what's the number of households with per capita income being $16,820
SELECT number_of_households FROM table_1350350_2 WHERE per_capita_income = "$16,820"
What is the lowest value for Olympics, when Sailors is greater than 1, when First OG is after 1948, and when Class is "Flying Dutchman"?
SELECT MIN(olympics_so_far) FROM table_name_80 WHERE sailors > 1 AND first_og > 1948 AND class = "flying dutchman"
Please write down the footnote descriptions of Albania in 1981.
SELECT DISTINCT T1.Description FROM FootNotes AS T1 INNER JOIN Country AS T2 ON T1.Countrycode = T2.CountryCode WHERE T1.Year = 'YR1981' AND T2.ShortName = 'Albania'
Tell the number of papers that were presented at "International Symposium on Software Testing and Analysis" conference.
SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Symposium on Software Testing and Analysis'
Name the party for pennsylvania 10
SELECT party FROM table_25030512_41 WHERE district = "Pennsylvania 10"
What is Finish, when To Par is less than 14, and when Year(s) Won is "1952 , 1963"?
SELECT finish FROM table_name_85 WHERE to_par < 14 AND year_s__won = "1952 , 1963"
Find the names of all directors whose movies are rated by Sarah Martinez.
SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez'
Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.
SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010
What was the average attendance in week 2?
SELECT AVG(attendance) FROM table_name_61 WHERE week = 2
What winner has the sanremo to cuneo as the course?
SELECT winner FROM table_name_51 WHERE course = "sanremo to cuneo"
What are each owner's first name, last name, and the size of their dog?
SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id
Which extra resulted in 2nd before 2005?
SELECT extra FROM table_name_30 WHERE result = "2nd" AND year < 2005
Show names of people whose nationality is not "Russia".
SELECT Name FROM people WHERE Nationality != "Russia"
Which Against has a Position larger than 8, and Points larger than 9?
SELECT against FROM table_name_67 WHERE position > 8 AND points > 9
Who was the Republican when the green was Harold Burbank?
SELECT republican FROM table_name_27 WHERE green = "harold burbank"
What are the first names of all students taking accoutning and Computer Information Systems classes?
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'
What is the average attendance of stadiums with capacity percentage higher than 100%?
SELECT average_attendance FROM stadium WHERE capacity_percentage > 100
How many directors directed an episode that reached 2.48 million viewers?
SELECT COUNT(directed_by) FROM table_27047554_1 WHERE us_viewers__in_millions_ = "2.48"
What was the class when part 2 was *hēt?
SELECT class FROM table_name_61 WHERE part_2 = "*hēt"
What are the card numbers of members from Kentucky?
SELECT card_number FROM member WHERE Hometown LIKE "%Kentucky%"
what name was on the year 2012
SELECT name FROM table_name_22 WHERE year * __est_ = "2012"
What are the names of mountains in the area?
SELECT Name FROM mountain
Select the names of manufacturer whose products have an average price higher than or equal to $150.
SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING avg(T1.price) >= 150
What is the venue that is located in zhodino?
SELECT venue FROM table_name_84 WHERE location = "zhodino"
How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?
SELECT count(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia'
What is the average number of working horses of farms with more than 5000 total number of horses?
SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000
How many composer are there?
SELECT count ( Composer ) FROM TRACK
Find the number of distinct stages in claim processing.
SELECT count(*) FROM claims_processing_stages
Can you list the number of invoices from the US grouped by billing city?
SELECT billing_city, COUNT ( * ) FROM invoices where billing_country = "USA" group by billing_city
list out the customers first name
SELECT customer_first_name FROM Customers
What are the names of players who train between 500 and 1500 hours?
SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
How many movie theatres have a capacity of at least 300 people?
SELECT count ( * ) FROM cinema WHERE capacity > = 300
How many more black female victims than white female victims were discovered?
SELECT SUM(race = 'B') - SUM(race = 'W') FROM subjects WHERE gender = 'F'
which customers pay with debit card?
select * from customers where payment_method = "Direct Debit"
What was the percentage of others when the number for Bush was 3196?
SELECT others_percentage FROM table_1733513_1 WHERE bush_number = 3196
Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.
SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;
What's the average hours per week all students played athletics?
select avg ( HoursPerWeek ) from SportsInfo
What position is 1999?
SELECT position FROM table_name_83 WHERE year = 1999
In what year did Morgan Brian win?
SELECT AVG(year) FROM table_name_75 WHERE winner = "morgan brian"
What is the Presentation of Credentials has a Termination of Mission listed as August 15, 2000?
SELECT presentation_of_credentials FROM table_name_91 WHERE termination_of_mission = "august 15, 2000"
What is the Time with a Ground that is humber college north?
SELECT time FROM table_name_7 WHERE ground = "humber college north"
List the games from the publisher "Activision".
SELECT T3.game_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.publisher_name = 'Activision'
In the games at corio oval, what was the highest crowd?
SELECT MAX(crowd) FROM table_name_62 WHERE venue = "corio oval"
What is the total number of professors with a Ph.D. ?
SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.'
Can you show me what dates appear more than once again?
SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count ( * ) > 1
What episode # has govinda & david dhawan as the eliminated contestant?
SELECT episode__number FROM table_name_66 WHERE eliminated_contestant = "govinda & david dhawan"
Among the sales people, who are hired prior to 2010?
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP' AND SUBSTR(T1.HireDate, 0, 4) < 2010
What are the numbers of races for each constructor id?
SELECT COUNT(*), constructorid FROM constructorStandings GROUP BY constructorid
Please give the first name and phone number of the client whose complaint id is CR0922485.
SELECT T1.first, T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0922485'
What is the total number of assists of the player with 0 goals, more than 1 points, and more than 0 pims?
SELECT COUNT(assists) FROM table_name_85 WHERE goals = 0 AND points > 1 AND pims > 0
list the hardware model name
SELECT Hardware_Model_name FROM phone
When 4 is the week what is the location?
SELECT location FROM table_24136365_2 WHERE week = 4
How many campuses are there in Los Angeles county?
SELECT count(*) FROM campuses WHERE county = "Los Angeles"
Tell me the label for digital download for bonus tracks version
SELECT label FROM table_name_39 WHERE format = "digital download" AND edition_s_ = "bonus tracks version"
What was the time for tracks before 19 on 8/26/69?
SELECT time FROM table_name_75 WHERE release_date = "8/26/69" AND track < 19
Indicate the slug and the itunes url of the podcast whose review content was written Can't stop listening.
SELECT slug, itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM reviews WHERE content = 'Can''t stop listening' )
For each room, find its name and the number of times reservations were made for it.
SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room
Provide the university name and ID of the university found in Turkey.
SELECT T1.university_name, T1.id FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Turkey'
What are the keywords for episode 426 of the series?
SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.number_in_series = 426;
Find the codes of countries that have more than 50 players.
SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50
What network has an aspect of 4:3 and a PSIP Short Name of qvc?
SELECT network FROM table_name_80 WHERE aspect = "4:3" AND psip_short_name = "qvc"
What Player's To par is −6?
SELECT player FROM table_name_54 WHERE to_par = "−6"
When fort irwin-barstow/victorville is the type of fare what is the cash fare?
SELECT cash_fare FROM table_20803241_1 WHERE type_of_fare = "Fort Irwin-Barstow/Victorville"
What is the Date of the Middlesbrough Home game?
SELECT date FROM table_name_42 WHERE home_team = "middlesbrough"
What engine was used after 1984?
SELECT engine FROM table_name_87 WHERE year > 1984
What is the name of the publisher of the book "The Illuminati"?
SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'The Illuminati'
Show me the name of the medicines that are present in both the tables?
SELECT T1.name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor'
Name the most withdrawn for 37 lstr no.
SELECT MAX(withdrawn) FROM table_20391799_1 WHERE ltsr_no = 37
What is the fleet number for the model of Gillig Phantom 3096TB?
SELECT fleet_number FROM table_name_95 WHERE model = "gillig phantom 3096tb"
What is the pick of player don waddell from round 7?
SELECT pick FROM table_name_96 WHERE round = "7" AND player = "don waddell"
Where was the 1400 m held?
SELECT venue FROM table_14981555_1 WHERE distance = "1400 m"
How many models of Ford Maverick were produced?
SELECT COUNT(DISTINCT T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford maverick'
Give the location of the university ID 112.
SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.id = 112
When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications?
SELECT conversion_from_patent_application FROM table_2279413_1 WHERE maximum_term = "10 years" AND pct_route_available = "Yes"
List by their id all customers who have a debit balance in their accounts.
SELECT c_custkey FROM customer WHERE c_acctbal < 0
Show the advisors of the students whose city of residence has city code "BAL".
SELECT Advisor FROM STUDENT WHERE city_code = "BAL"
List the cities where the product 'Mishi Kobe Niku' were shipped to.
SELECT T1.ShipCity FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T3.ProductName = 'Mishi Kobe Niku'
What Surface has a Date of 1 september 2008?
SELECT surface FROM table_name_18 WHERE date = "1 september 2008"
What is the screen size and pixel amount of model p5000 when the dimensions are 98×64.5×41?
SELECT screen_size, pixels FROM table_name_28 WHERE dimensions_w×h×d__mm_ = "98×64.5×41" AND model = "p5000"
What's the l1 cache of the model with sspec number sl2z3, sl28q (mya0)?
SELECT l1_cache FROM table_24096813_15 WHERE sspec_number = "SL2Z3, SL28Q (myA0)"
Who had the fastest lap in the race won by Team Impul at the Twin Ring Motegi circuit?
SELECT fastest_lap FROM table_16670746_2 WHERE winning_team = "Team Impul" AND circuit = "Twin Ring Motegi"
what is the score when the away team is rivercity rage?
SELECT score FROM table_name_99 WHERE away_team = "rivercity rage"
What is the sum of againsts the team with less than 38 played had?
SELECT SUM(against) FROM table_name_86 WHERE played < 38
What is the High rebounds with a Series with 4–2?
SELECT high_rebounds FROM table_name_13 WHERE series = "4–2"
Which category is the film "Beach Heartbreakers" falls into?
SELECT T3.name FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T1.title = 'BEACH HEARTBREAKERS'
Tell me the status of eliminated of anton dela paz
SELECT status FROM table_name_15 WHERE eliminated = "anton dela paz"
what's the artist id for Everybody Have Fun Tonight
SELECT artist_id FROM volume WHERE Song LIKE "%Everybody Have Fun Tonight%"
On what date was the away team Sheffield Wednesday?
SELECT date FROM table_name_51 WHERE away_team = "sheffield wednesday"
What was the crowd size for the Home team of melbourne?
SELECT COUNT(crowd) FROM table_name_54 WHERE home_team = "melbourne"
What's the position of the club with w-l-d of 6-2-8?
SELECT MAX(position) FROM table_13713206_1 WHERE w_l_d = "6-2-8"
how many distinct names of the products have characteristc name warm?
SELECT count ( DISTINCT t1.product_name ) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "warm"