sentence
stringlengths
3
347
sql
stringlengths
18
804
How many tracks belong to rock genre?
SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock"
Find the names of all modern rooms with a base price below $160 and two beds.
SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'
Can you please list the names of the journalists in a table with the number of events they each reported?
SELECT T3.Name , COUNT ( * ) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name
what is the highest events when the cuts made is less than 34, the top-25 is less than 5 and the top-10 is more than 1?
SELECT MAX(events) FROM table_name_72 WHERE cuts_made < 34 AND top_25 < 5 AND top_10 > 1
Records from Kontor Records from the catalog of Kontor446 was released in what format?
SELECT format FROM table_name_63 WHERE label = "kontor records" AND catalog = "kontor446"
How many new entries started in the quarter finals?
SELECT new_entries_this_round FROM table_18328569_1 WHERE round = "Quarter finals"
What is the highest population in 2001?
SELECT MAX(population__2001_) FROM table_27366772_3
Which school picked a back in round 16, after pick 89?
SELECT school FROM table_name_20 WHERE pick > 89 AND position = "back" AND round = 16
What is the lowest gold when there are 0 bronze and the total is less than 2, and silver is less than 0?
SELECT MIN(gold) FROM table_name_24 WHERE bronze = 0 AND total < 2 AND silver < 0
What is the name of the department with the most students enrolled?
SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY count(*) DESC LIMIT 1
What was the high points when the team was Washington?
SELECT high_points FROM table_27755603_10 WHERE team = "Washington"
Who are cast members in an English movie which has a running time equal to 2? Please list their IDs.
SELECT T2.actorid FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.runningtime = 2 AND T1.isEnglish = 'T'
When did the Chiefs have their first bye?
SELECT MIN(week) FROM table_name_47 WHERE attendance = "bye"
What is the Result of Venue of edmonton, canada?
SELECT result FROM table_name_54 WHERE venue = "edmonton, canada"
What was the Result in 2013?
SELECT result FROM table_name_48 WHERE year = 2013
How many of the "Hon Pagoda Stacking Chairs" have been sold in total in the west superstore?
SELECT SUM(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Hon Pagoda Stacking Chairs'
List the 3 highest salaries of players in the AL in 2001
SELECT salary FROM salary WHERE YEAR = 2001 and league_id = "AL" ORDER BY salary DESC LIMIT 3
Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.
SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "660 Shea Crescent" OR T2.How_to_Get_There = "walk"
Show the distinct leader names of colleges associated with members from country "Canada".
SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = "Canada"
which phone has the highest screen mode on the table
select * from phone where screen_mode = ( select max ( screen_mode ) from phone )
What parties have at least three representatives?
SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3
What is the Home team of the Lincoln City Away game?
SELECT home_team FROM table_name_5 WHERE away_team = "lincoln city"
Which Catalog has a Date of july 15, 2011?
SELECT AVG(catalog) FROM table_name_73 WHERE date = "july 15, 2011"
Which city does staff with first name as Janessa and last name as Sawayn live?
SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";
What is the total population and maximum GNP in Asia?
SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = "Asia"
How many days had both mean humidity above 50 and mean visibility above 8?
SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8
what is participant type code of karlee batz
SELECT Participant_Type_Code FROM Participants WHERE Participant_Details = "Karlee Batz"
Show all the distinct product names with price higher than the average.
SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS)
How many of those organizations are parent organizations?
select organization_id from Organizations where organization_id in ( SELECT parent_organization_id FROM organizations )
How many students were absence for 4 month?
SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 4
How many countries have a life expectancy of 75.1?
SELECT COUNT(*) FROM Country WHERE LifeExpectancy = 75.1
What was the crowd attendance when the home team was Melbourne?
SELECT COUNT(crowd) FROM table_name_73 WHERE home_team = "melbourne"
what is the city for the country of netherlands?
SELECT city FROM table_name_96 WHERE country = "netherlands"
How many different cities are represented by contestants whose height stands at 1.80?
SELECT COUNT(hometown) FROM table_22447251_2 WHERE height = "1.80"
List all countries with 'Category III' membership in 'IFAD' organization. Please also provide the capital of the country.
SELECT Name, Capital FROM country WHERE Code IN ( SELECT Country FROM isMember WHERE type = 'Category III' AND Organization = 'IFAD' )
Which Census Ranking has an Area km 2 larger than 753.06, and an Official Name of stanley?
SELECT census_ranking FROM table_name_94 WHERE area_km_2 > 753.06 AND official_name = "stanley"
Which show as previously on The Family Channel?
SELECT show FROM table_169766_13 WHERE previous_network = "The Family Channel"
What are the indicator codes for the Republic of Albania in the year 1960?
SELECT DISTINCT T1.IndicatorCode FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Year = 1960 AND T2.LongName = 'Republic of Albania'
What class is the city of black mountain, north carolina?
SELECT class FROM table_name_45 WHERE city_of_license = "black mountain, north carolina"
What are the names of students who have 2 or more likes?
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2
Count the number of different countries that climbers are from.
SELECT COUNT(DISTINCT Country) FROM climber
what is the title when the featuring is leela and series sorted is 4s/b?
SELECT title FROM table_name_71 WHERE featuring = "leela" AND series_sorted = "4s/b"
What is the label ID of "Third-party card management" category?
SELECT label_id FROM label_categories WHERE category = 'Third-party card management'
Which film has the most number of actors or actresses? List the film name, film id and description.
SELECT T2.title , T2.film_id , T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1
Name the lms number for serial number being 372
SELECT lms_no FROM table_20236726_2 WHERE serial_no = 372
What Week had an Attendance smaller than 22,333?
SELECT COUNT(week) FROM table_name_12 WHERE attendance < 22 OFFSET 333
What is the tyres with a year earlier than 1961 for a climax l4 engine?
SELECT tyres FROM table_name_33 WHERE year < 1961 AND engine = "climax l4"
What is the total amount of grid when the laps amount was smaller than 68 and the time/retired was injection?
SELECT SUM(grid) FROM table_name_87 WHERE laps < 68 AND time_retired = "injection"
Show the names of customers who use Credit Card payment method and have more than 2 orders.
SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_method_code = 'Credit Card' GROUP BY T1.customer_id HAVING count(*) > 2
Which institute has the highest percentage of male White students graduating in 2011 within 150 percent of normal/expected time?
SELECT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'W' AND T2.grad_150 = ( SELECT MAX(T2.grad_150) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'W' )
Nme the most cuts made for wins being 0
SELECT MAX(cuts_made) FROM table_1697190_1 WHERE wins = 0
What is the lightest Weight (kg), when the Jersey # is greater than 22, when the Position is F, and when the Birthdate is March 19, 1980?
SELECT MIN(weight__kg_) FROM table_name_62 WHERE jersey__number > 22 AND position = "f" AND birthdate = "march 19, 1980"
Who is the player from Hotchkiss School with a position of d?
SELECT player FROM table_name_45 WHERE position = "d" AND team_from = "hotchkiss school"
What is the date of the poll with Silbert at 18%?
SELECT date FROM table_name_53 WHERE silbert = "18%"
List down the encounter descriptions of patients who were born in Pittsfield MA US.
SELECT DISTINCT T2.DESCRIPTION FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.birthplace = 'Pittsfield MA US'
What is the language that is used by the largest number of Asian nations?
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = "Asia" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1
Tell me the date for new orleans saints
SELECT date FROM table_name_22 WHERE opponent = "new orleans saints"
What is the hometown of the representative that served the twenty-sixth legislature?
SELECT hometown FROM table_name_22 WHERE legislatures = "twenty-sixth"
Provide the registered courses' names by undergraduate students with GPA of 3.7 and above.
SELECT DISTINCT T1.f_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.type = 'UG' AND T1.gpa > 3.7
What event has a time of 7:45.67?
SELECT event FROM table_name_62 WHERE time = "7:45.67"
i mean chromosome value ? | You mean PBG deaminase? | yes
SELECT Chromosome from enzyme where name = "PBG deaminase"
Who is the player with a t10 place, from the United States, and has a score of 69-70-76=215?
SELECT player FROM table_name_61 WHERE place = "t10" AND country = "united states" AND score = 69 - 70 - 76 = 215
Show the location name for document "Robin CV".
SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = "Robin CV"
Which Away team score has a Venue of scg?
SELECT away_team AS score FROM table_name_82 WHERE venue = "scg"
What is the lowest win number of the competitor who had 90 points before 1994?
SELECT MIN(wins) FROM table_name_41 WHERE points = 90 AND year < 1994
Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.
SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000
What number has 2008 as the season?
SELECT number FROM table_name_38 WHERE season = "2008"
Show invoice dates and order id and details for all invoices.
SELECT T1.invoice_date , T1.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id
How many students have the incident type code "VIOLENCE"?
SELECT count ( * ) from Behavior_Incident where incident_type_code = "VIOLENCE"
What was his position in 2009 with 1 win?
SELECT position FROM table_name_93 WHERE wins = "1" AND season = "2009"
What is the name of the root beer brand with the lowest unit profit available to wholesalers?
SELECT BrandName FROM rootbeerbrand ORDER BY CurrentRetailPrice - WholesaleCost LIMIT 1
Name 5 country codes of country with highest value and state the region of these countries.
SELECT DISTINCT T1.CountryCode, T1.Region FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode ORDER BY T2.Value DESC LIMIT 5
Who was the dirctor for season 13?
SELECT director_s_ FROM table_11715748_2 WHERE season__number = 13
How many different status codes of things are there?
SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things
What types of food are served at the 4 top-reviewed restaurants?
SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4
What are the titles of all albums that start with A in alphabetical order?
SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title;
Give me the name of each club.
SELECT clubname FROM club
How many professionals have performed any treatment to dogs?
SELECT COUNT(DISTINCT professional_id) FROM Treatments
What location has an attendance and a score of l 90–91 (ot)?
SELECT location_attendance FROM table_name_28 WHERE score = "l 90–91 (ot)"
Name the Others# when McCain# is 4730.
SELECT others_number FROM table_20750731_1 WHERE mccain_number = 4730
Which song has a ending theme, and is sung by miriam yeung?
SELECT name_of_the_song FROM table_name_75 WHERE kind_of_the_song = "ending theme" AND singer = "miriam yeung"
Tell me the away team score for away team of south melbourne
SELECT away_team AS score FROM table_name_23 WHERE away_team = "south melbourne"
What is the country associated with the date in 2003?
SELECT country FROM table_name_34 WHERE date = "2003"
Could you give me the names of all phones?
select distinct ( name ) from phone
Show all locations and the total number of platforms and passengers for all train stations in each location.
SELECT LOCATION , sum(number_of_platforms) , sum(total_passengers) FROM station GROUP BY LOCATION
Who is the opponent for the game that occurred after week 13?
SELECT opponent FROM table_name_12 WHERE week > 13
What are the names of all races that occurred after 12:00:00 or before 09:00:00?
SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"
How many first teams chose to bat after winning the toss?
SELECT COUNT(Team_1) FROM `Match` WHERE Team_1 = Toss_Winner AND Toss_Decide = 2
What is the l/100km urban (cold) with a CO 2 g/km less than 222, an mpg-us urban greater than 17.8, an mpg-uk extra-urban of 55.4, and an engine capacity greater than 1560?
SELECT l_100km_urban__cold_ FROM table_name_24 WHERE co_2_g_km < 222 AND mpg_us_urban > 17.8 AND mpg_uk_extra_urban = 55.4 AND engine_capacity > 1560
How many distinct birth places are there?
SELECT count(DISTINCT Birth_Place) FROM people
Find the names of all swimmers, sorted by their 100 meter scores in ascending order.
SELECT name FROM swimmer ORDER BY meter_100
Name the patients who had an allergy to soy.
SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Allergy to soya'
Who was the Long Beach constructor?
SELECT constructor FROM table_name_24 WHERE location = "long beach"
What is the to par for the 69-70-72=211 score?
SELECT to_par FROM table_name_56 WHERE score = 69 - 70 - 72 = 211
Among the donations with a portion using account credits redemption, how many of them are for projects created by teachers working in a public year-round school?
SELECT COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_acct_credit = 't' AND T1.school_year_round = 't'
How many units of item no.5 were sold in store no.3 on the day the temperature range was the biggest?
SELECT t2.units FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T2.item_nbr = 5 ORDER BY t3.tmax - t3.tmin DESC LIMIT 1
What is the inspection result for inspection done by Thomas Langley?
SELECT DISTINCT T2.results FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.first_name = 'Thomas' AND T1.last_name = 'Langley'
What is the quantity of the part "burnished seashell gainsboro navajo chocolate" ordered in order no.1?
SELECT T1.l_quantity FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T1.l_orderkey = 1 AND T2.p_name = 'burnished seashell gainsboro navajo chocolate'
Find the names of swimmers who has a result of "win".
SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'
How many businesses in Scottsdale are rated as "wonderful experience"?
SELECT COUNT(business_id) FROM Business WHERE city LIKE 'Scottsdale' AND stars > 3