sentence
stringlengths
3
347
sql
stringlengths
18
804
Among orders shipping to Brazil, mention the supplier company of the order which was done by employee Anne Dodsworth in December, 1996 .
SELECT T5.CompanyName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID INNER JOIN Suppliers AS T5 ON T4.SupplierID = T5.SupplierID WHERE T1.FirstName = 'Anne' AND T1.LastName = 'Dodsworth' AND T2.ShipCountry = 'Brazil' AND T2.OrderDate LIKE '1996-12%'
What is the mail date of the document with id 7?
SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;
What season was the overall record 29-7?
SELECT season FROM table_14609295_4 WHERE overall = "29-7"
Can you include the artist names and their genders too?
SELECT T1.artist_name , T1.gender,T2.song_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE "%Mar%"
what is the height of John Danks
select height from people where name = "John Danks"
What are the countries of markets and their corresponding years of market estimation?
SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID
Who was the winner against Lindsay Davenport?
SELECT winner FROM table_name_42 WHERE finalist = "lindsay davenport"
What is the description of the product category with the code 'Spices'?
SELECT product_category_description FROM ref_product_categories WHERE product_category_code = "Spices"
How many pageants were in san fernando, pampanga?
SELECT COUNT(pageant) FROM table_1825751_14 WHERE hometown = "San Fernando, Pampanga"
Find the number of employees hired in each shop; show the shop name as well.
SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name
Please give the url of the repository whose files are contained in solution ID 9?
SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 9
What is the age of the oldest male user of the app?
SELECT MAX(age) FROM gender_age WHERE gender = 'M'
List the full name of all the 'Production Technician - WC50'
SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 USING (BusinessEntityID) WHERE T1.JobTitle = 'Production Technician - WC50' GROUP BY T2.FirstName, T2.MiddleName, T2.LastName
Show the names of the buildings
SELECT name FROM buildings
Please show different software platforms and the corresponding number of devices using each.
SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform
What is the maximum number of wins?
SELECT MAX(wins) FROM table_26222468_1
List all the keywords with "christmas" in them.
SELECT keyword_name FROM keyword WHERE keyword_name LIKE '%christmas%'
Which entrant has a year after 1955?
SELECT entrant FROM table_name_59 WHERE year > 1955
How many Field goals (5 points) have a Total Points of 123, and Touchdowns (5 points) larger than 13?
SELECT COUNT(field_goals__5_points_) FROM table_name_59 WHERE total_points = 123 AND touchdowns__5_points_ > 13
When the away team was north melbourne, what was the away team score?
SELECT away_team AS score FROM table_name_63 WHERE away_team = "north melbourne"
What are the names of ships that have more than one captain?
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1
How many games has each stadium held?
SELECT T1.id , count(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id
For the root beer brand which got the review with the content of "The quintessential dessert root beer. No ice cream required.", what is the current retail price of the root beer?
SELECT T1.CurrentRetailPrice - T1.WholesaleCost AS price FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.Review = 'The quintessential dessert root beer. No ice cream required.'
What is the earliest year a red maple had a mintage over 15,000?
SELECT MIN(year) FROM table_name_48 WHERE theme = "red maple" AND mintage > 15 OFFSET 000
On which continent is the country with the most erosion of real income?
SELECT T1.Name FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN economy AS T4 ON T4.Country = T3.Code ORDER BY T4.Inflation DESC LIMIT 1
What years did art grand prix compete?
SELECT season FROM table_10748727_1 WHERE team_name = "ART Grand Prix"
can you show me a list of grades?
SELECT Grade FROM list
WHAT IS THE AWAY TEAM WITH A TIE NUMBER 1?
SELECT away_team FROM table_name_46 WHERE tie_no = "1"
How many times did Fiji win r1?
SELECT COUNT(r1) FROM table_18812411_3 WHERE country = "Fiji"
What is the height in feet of player number 24?
SELECT height_in_ft FROM table_name_70 WHERE no_s_ = "24"
Who received gold when the event is road race details and silver is max weber germany (ger)?
SELECT gold FROM table_name_96 WHERE event = "road race details" AND silver = "max weber germany (ger)"
Please provide a link to the most well-known repository's Github address.
SELECT Url FROM Repo WHERE Watchers = ( SELECT MAX(Watchers) FROM Repo )
What game number was played on April 23, with Boston as the road team?
SELECT game FROM table_name_73 WHERE road_team = "boston" AND date = "april 23"
Which service types had both success and failure for their event details?
SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail'
On how many different dates was the race at the Silverstone circuit?
SELECT COUNT(date) FROM table_22334183_3 WHERE circuit = "Silverstone"
List the id of students who never attends courses?
SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)
How many players have an overall rating lower than the average?
SELECT count ( DISTINCT T1.id ) FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating < ( SELECT avg ( overall_rating ) FROM Player_Attributes )
What are the rounds for the B tyres and Ferrari 053 engine +?
SELECT rounds FROM table_name_50 WHERE tyre = "b" AND engine_† = "ferrari 053"
What is the highest population in the millions that has an influence of 1.02?
SELECT MAX(population_millions) FROM table_name_55 WHERE influence = 1.02
Who is the director of the production number 9368?
SELECT director FROM table_name_51 WHERE production_number = "9368"
What is the NCBI Accession Number of the Homo Sapiens species?
SELECT ncbi_accession_number__mrna_protein_ FROM table_16849531_2 WHERE species = "Homo sapiens"
Report all majors that have less than 3 students.
SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3
What is the lowest number of points for an entrant with a Jordan 192 chassis?
SELECT MIN(pts) FROM table_name_20 WHERE chassis = "jordan 192"
What is the id and last name of the driver who participated in the most races after 2010?
SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count ( * ) DESC LIMIT 1
Who was the opponent at the game at Madison Square Garden?
SELECT opponent FROM table_name_19 WHERE location_attendance = "madison square garden"
How many teachers are there?
SELECT count ( name ) FROM instructor WHERE id IN ( SELECT id FROM teaches )
What was the Opponent in the game with a Result of W 23-7?
SELECT opponent FROM table_name_30 WHERE result = "w 23-7"
When the away team is Millwall, what is the total possible amount of tie numbers?
SELECT COUNT(tie_no) FROM table_24887326_7 WHERE away_team = "Millwall"
Among the employees who are married, how many of them have a western name style?
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.NameStyle = 0 AND T1.MaritalStatus = 'M'
What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?
SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'
Which Shakespeare story with character ID 324 has description of 'this friend of Caesar'?
SELECT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T2.id = '324' AND T2.Description = 'friend to Caesar'
What is the Total medals the Year Yugoslavia had 1 Sport and won 0 Gold, Bronze or Silver?
SELECT total FROM table_name_94 WHERE gold = "0" AND bronze = "0" AND silver = "0" AND sports = "1"
Name the total number of round 3 for class tt1
SELECT COUNT(round_3) FROM table_18646111_13 WHERE class = "TT1"
Find the name of the campuses opened before 1800.
SELECT campus FROM campuses WHERE YEAR < 1800
Please list all the brands that contain a part under the type "promo brushed steel".
SELECT p_brand FROM part WHERE p_type = 'PROMO BRUSHED STEEL'
State the max temperature of the weather station which has the no.21 store on 2012/11/9.
SELECT tmax FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 21 AND T1.`date` = '2012-11-09'
What year was the geological feature with a latitude of 76.0n and a diameter larger than 548 km was named?
SELECT MAX(year_named) FROM table_name_78 WHERE latitude = "76.0n" AND diameter__km_ > 548
What was the score for the matchup having attendance of 354?
SELECT score FROM table_name_25 WHERE att = 354
Give the names of universities with number of students ranges from 400 to 1000.
SELECT DISTINCT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.num_students BETWEEN 400 AND 1000
How many states had a population density of 10188.8?
SELECT COUNT(state) FROM table_22916979_1 WHERE population_density__people_per_mi_2__ = "10188.8"
Find the name of the person who has no student friends.
SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student'
How many movie directors are there?
SELECT COUNT (DISTINCT director) FROM movie
For Model e12 what is the IFLs/uIFLs?
SELECT ifls___uifls FROM table_name_77 WHERE model = "e12"
What position did someone play from 1982-84?
SELECT position FROM table_name_78 WHERE years_for_jazz = "1982-84"
On what date was the bridge located in McClain listed?
SELECT listed FROM table_name_29 WHERE location = "mcclain"
What is the name of the player with the largest number of votes?
SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1
How many rounds had an overall of 211?
SELECT COUNT(round) FROM table_name_24 WHERE overall = 211
What are the names of the airports in the city of Goroka?
SELECT name FROM airports WHERE city = 'Goroka'
Find the name and email of the user whose name contains the word ‘Swift’.
SELECT name , email FROM user_profiles WHERE name LIKE '%Swift%'
What was the manner of departure for the appointment date of 21 september 2010
SELECT manner_of_departure FROM table_27495117_3 WHERE date_of_appointment = "21 September 2010"
List from which date and to which date these staff work: project staff of the project which hires the most staffs
SELECT date_from , date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'leader';
Which team was the opponent on october 21?
SELECT team FROM table_27734577_2 WHERE date = "October 21"
What is the category that came before 2011?
SELECT category FROM table_name_44 WHERE year < 2011
What is the 1986 value with A in 1991 and A in 1987?
SELECT 1986 FROM table_name_17 WHERE 1991 = "a" AND 1987 = "a"
Which colleges have the english abbreviation MTC?
SELECT english_name FROM table_11390711_4 WHERE abbreviation = "MTC"
What party is incumbent Oliver H. Cross?
SELECT party FROM table_1342331_43 WHERE incumbent = "Oliver H. Cross"
Which country placed t3 and had the player Fred Couples?
SELECT country FROM table_name_37 WHERE place = "t3" AND player = "fred couples"
How many members are in theat club?
SELECT count ( * ) from club as T1 join member_of_club as T2 on T1.clubid = T2.clubid group by T2.clubid order by count ( * ) desc limit 1
How many active businesses are opened during late afternoon in the Phoenix city? List out the top 3 categories name for these businesses.
SELECT DISTINCT T4.category_name FROM Business_Hours AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T2.active = 'true' AND T2.city = 'Phoenix' AND T1.opening_time >= '5PM' LIMIT 3
Was the missile intercepted by patriot when the parking lot was damaged?
SELECT intercepted_by_patriot FROM table_23014685_1 WHERE area_damaged = "Parking lot"
What is the name of the stadium which held the most events?
SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1
What are all the distinct payment types?
SELECT DISTINCT payment_type_code FROM payments
Find the details for all chip models.
SELECT * FROM chip_model
What is the model that was made in the years 2011 2012-?
SELECT model FROM table_name_27 WHERE years = "2011 2012-"
What are the names of the products that have a color description of 'red' and the 'fast' characteristic?
SELECT 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 JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "fast"
Which Attendance has an Opponent of carolina panthers?
SELECT attendance FROM table_name_27 WHERE opponent = "carolina panthers"
Show all allergies and their types.
SELECT allergy , allergytype FROM Allergy_type
What are the names of the products that were ordered that have a unit price of no more than 5?
SELECT DISTINCT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.UnitPrice < 5
What is the description of the discount for the product with the id "762"?
SELECT T2.Description FROM SpecialOfferProduct AS T1 INNER JOIN SpecialOffer AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID WHERE T1.ProductID = 762
What are all the instruments used by the musician with the last name "Heilo"?
SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo"
Provide the name of competitors from Greece.
SELECT T3.full_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Greece'
What was the score when the away team was Footscray?
SELECT away_team AS score FROM table_name_25 WHERE away_team = "footscray"
What date was the game where the visiting team was philadelphia?
SELECT date FROM table_name_10 WHERE visitor = "philadelphia"
What is the lowest losses for a team that has 0 draws, fewer than 4 wins, and no Byes?
SELECT MIN(losses) FROM table_name_68 WHERE draws = 0 AND wins < 4 AND byes < 0
What was the pick number for the wide receiver drafted from Michigan State?
SELECT pick__number FROM table_name_7 WHERE position = "wide receiver" AND college = "michigan state"
What is the last name of the musician that have produced the most number of 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
Which chassis had an entrant of John Mecom?
SELECT chassis FROM table_name_37 WHERE entrant = "john mecom"
Show the most common position of players in match seasons.
SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1
Which language does the film AIRPORT POLLOCK use? List the language name.
SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
What work type do those journalists do?
SELECT T3.Name , T1.Work_Type 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