sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Please provide contact details of all Marketing Managers. State their name and phone number. | SELECT T1.FirstName, T1.LastName, T2.PhoneNumber FROM Person AS T1 INNER JOIN PersonPhone AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Employee AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.JobTitle = 'Marketing Manager' |
What is the type description of the organization whose detail is listed as 'quo'? | SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo' |
How many in the introduced segment retired later than 1994 and had Fokker as a manufacturer? | SELECT COUNT(introduced) FROM table_name_80 WHERE retired > 1994 AND manufacturer = "fokker" |
Can you show the rating of the song Tumi robe nirobe? | SELECT rating FROM song WHERE song_name = "Tumi robe nirobe" |
Name customers in India with account balances over $5000. | SELECT T1.c_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal > 5000 AND T2.n_name = 'INDIA' |
Give me the title and highest price for each film. | SELECT T2.title , max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id |
What are the famous titles of artists who do not have any volumes? | SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume) |
What event did Soa Palelei fight against son hai suk? | SELECT event FROM table_name_31 WHERE opponent = "son hai suk" |
Which Year has a Position of 2nd, and Notes of -63kg, and a Venue of manchester? | SELECT year FROM table_name_4 WHERE position = "2nd" AND notes = "-63kg" AND venue = "manchester" |
What is the ratio between male and female legislators? | SELECT CAST(SUM(CASE WHEN gender_bio = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN gender_bio = 'F' THEN 1 ELSE 0 END) FROM historical |
Which station has the highest average high temperature? | Which attributes of this station do you want? | The station name. | SELECT t2.network_name FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY avg ( high_temperature ) DESC LIMIT 1 |
Which driver's grid was 24? | SELECT driver FROM table_name_10 WHERE grid = 24 |
what is the age of William B. Maclay | SELECT Age FROM people WHERE name = "William B. Maclay" |
In language where Saturday is සෙනසුරාදා senasuraadaa, what is Tuesday? | SELECT tuesday_mangala__mars_ FROM table_1277350_3 WHERE saturday_shani__saturn_ = "සෙනසුරාදා Senasuraadaa" |
Which group has David D'Angers as the official history? | SELECT group FROM table_name_91 WHERE official_history = "david d'angers" |
Who was the writer for season episode 7? | SELECT written_by FROM table_27397948_2 WHERE no_in_season = 7 |
List the scenes and descriptions in Act 1 of " Pericles, Prince of Tyre". | SELECT T2.Scene, T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Pericles, Prince of Tyre' AND T2.Act = 1 |
When 74804 is the attendance what week is it? | SELECT week FROM table_14941284_1 WHERE attendance = 74804 |
What venue was essendon the away team? | SELECT venue FROM table_name_20 WHERE away_team = "essendon" |
How many turnovers per game did the assist champion had in the 2003 NBA season? | SELECT AVG(T2.turnovers) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 2003 GROUP BY T1.playerID, T2.assists ORDER BY T2.assists DESC LIMIT 1 |
Which captain has howard wilkinson as the manager? | SELECT captain FROM table_name_52 WHERE manager = "howard wilkinson" |
What percentage of voters voted for a third party in the county that had 802 third party voters? | SELECT others__percentage FROM table_20278716_2 WHERE others__number = 802 |
What are the names of people with overall rating between 85 and 90? | by people did you mean players? | yes | SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > = 85 AND T2.overall_rating < = 90 |
What is the city area of the district with the highest population. | sELECT city_area FROM district ORDER BY city_population desC LIMIT 1 |
Which team is located in Lida? | SELECT team FROM table_name_91 WHERE location = "lida" |
How many students live in HKG or CHI? | SELECT COUNT(*) FROM Student WHERE city_code = "HKG" OR city_code = "CHI" |
Which Spoofed title had Mort Drucker as the artist in issue 88? | SELECT spoofed_title FROM table_name_97 WHERE artist = "mort drucker" AND issue = 88 |
Who's the partner at Tamara, Hon? | SELECT partner FROM table_18268930_1 WHERE location = "Tamara, HON" |
Among the recipes with alcohol content over 10, which recipe takes the longest to prepare? | SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol > 10 ORDER BY T1.prep_min DESC LIMIT 1 |
What was the date of the game that had a loss of Willis (0–1)? | SELECT date FROM table_name_32 WHERE loss = "willis (0–1)" |
What is the cyrillic name when the settlement is ašanja? | SELECT cyrillic_name FROM table_2562572_52 WHERE settlement = "Ašanja" |
find the minimum and maximum number of products of all stores. | SELECT MIN(Number_products), MAX(Number_products) FROM shop |
How many owners temporarily do not have any dogs? | SELECT COUNT(*) FROM Owners WHERE NOT owner_id IN (SELECT owner_id FROM Dogs) |
Select the name and price of all products with a price larger than or equal to 180, and sort first by price (in descending order), and then by name (in ascending order). | SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC |
What are the names of modern rooms that have a base price lower than $160 and two beds. | SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern'; |
What 2nd run has a less than 6 rank, and 3 as the total? | SELECT 2 AS nd_run FROM table_name_69 WHERE rank < 6 AND total = 3 |
Show the names of the buildings that have more than one company offices. | SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT ( * ) > 1 |
Show the years, book titles, and publishers for all books, in descending order by year. | SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC |
What is the sum of Events, when Top-10 is 7, and when Top-5 is greater than 4? | SELECT SUM(events) FROM table_name_80 WHERE top_10 = 7 AND top_5 > 4 |
What are the maximum and minumum grade points? | SELECT max(gradepoint) , min(gradepoint) FROM GRADECONVERSION |
How many problems did the product called "voluptatem" have in record? | SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem" |
What is 2004, when 2007 is "A", and when 1997 is "A"? | SELECT 2004 FROM table_name_36 WHERE 2007 = "a" AND 1997 = "a" |
what's the tries against with tries for being 47 | SELECT tries_against FROM table_12828723_3 WHERE tries_for = "47" |
Show the number of trains | SELECT COUNT(*) FROM train |
What was the topic of the show on March 15, 2008? | SELECT topic_of_the_show FROM table_name_5 WHERE date = "march 15, 2008" |
List the production code for the episode had 5.55 million viewers? | SELECT prod_code FROM table_2501754_3 WHERE viewing_figures_millions = "5.55" |
What is the zip postcode where Kaitlin lived? | Do you mean the zip postcode in the ares where the staff with first name Kaitlin lived? | Yes | SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Kaitlin" |
Number of international passengers per airport? | Did you want the names of airports and their number of international passengers? | Yes please. | SELECT airport_name, international_passengers FROM airport |
What was the score of the game with a record of 81-60? | SELECT score FROM table_name_71 WHERE record = "81-60" |
On June 17 in Tiger stadium, what was the average home run? | SELECT AVG(home_run) FROM table_name_43 WHERE location = "tiger stadium" AND date = "june 17" |
What is the name of the swimmer from Australia in lane 4 with a heat larger than 4? | SELECT name FROM table_name_16 WHERE heat > 4 AND lane = 4 AND nationality = "australia" |
Which opponent has a time of 1:50? | SELECT opponent FROM table_name_79 WHERE time = "1:50" |
What is the document status description of the document with id 1? | SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1; |
Which Home Captain has Venue of Bourda? | SELECT home_captain FROM table_name_42 WHERE venue = "bourda" |
What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956? | SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200 |
What are the average amount purchased and value purchased for the supplier who supplies the most products | SELECT avg ( total_amount_purchased ) , avg ( total_value_purchased ) FROM Product_Suppliers WHERE supplier_id = ( SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count ( * ) DESC LIMIT 1 ) |
What home team played against Richmond? | SELECT home_team FROM table_name_73 WHERE away_team = "richmond" |
Which Nebraska has 2004 year? | SELECT nebraska FROM table_name_25 WHERE year = "2004" |
highest mountain in Tanzania | Do you mean the name of the highest mountain in country Tanzania? | yes | SELECT name FROM mountain where country = 'Tanzania' order by height desc limit 1 |
What is the goals number of goals for the player who had 2 league cup apps and 0 FA cup goals? | SELECT COUNT(total_goals) FROM table_name_64 WHERE league_cup_apps = "2" AND fa_cup_goals < 0 |
What is the result for Gold Coast when Melbourne and Adelaide are yes, but Perth is no? | SELECT gold_coast FROM table_name_73 WHERE melbourne = "yes" AND perth = "no" AND adelaide = "yes" |
If the province is British Columbia, what is the Arabs 2001 total number? | SELECT COUNT(arabs_2001) FROM table_1939367_1 WHERE province = "British Columbia" |
Find the name of the most popular party form. | SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1 |
Who is the opponent in game 5? | SELECT opponent FROM table_20745706_1 WHERE _number = "5" |
Give me the names of all the authors. | select distinct author from submission |
faculty Ids who have at least 2 students | SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count ( * ) > = 2 |
What game had more than 50,324 in attendance? | SELECT date FROM table_name_45 WHERE attendance > 50 OFFSET 324 |
Show the themes of parties and the names of the party hosts. | SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID |
Which event had a decision method? | SELECT event FROM table_name_12 WHERE method = "decision" |
List the comments describing orders from customers in the furniture segment. | SELECT T1.o_comment FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'FURNITURE' |
I want to know the invoice dates corresponding to customers | SELECT T1.FirstName, T1.lastname, T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId |
Who was the finalist in the 2010 season in the host city tartu? | SELECT finalist FROM table_name_57 WHERE host_city = "tartu" AND season = 2010 |
Among the teenager clients who use Google account and Microsoft account, which group of client is more than the other? | SELECT CASE WHEN SUM(CASE WHEN email LIKE '%@gmail.com' THEN 1 ELSE 0 END) > SUM(CASE WHEN email LIKE '%@outlook.com' THEN 1 ELSE 0 END) THEN 'Google account' ELSE 'Microsoft account' END FROM client WHERE age BETWEEN 13 AND 19 |
Which Time/Retired has a Grid smaller than 3, and a Driver of mika häkkinen? | SELECT time_retired FROM table_name_58 WHERE grid < 3 AND driver = "mika häkkinen" |
What were the results before the year 2000? | SELECT result FROM table_name_7 WHERE year < 2000 |
can you show me the document date? | select document_date from documents |
How many number of platforms do they have? | could you give more info of your problem? it the "they" station id or location? | What is the number of platforms does train station in london has? | select sum ( Number_of_Platforms ) from station where Location = 'London' |
What is the game number that was on November 27? | SELECT _number FROM table_22871239_5 WHERE date = "November 27" |
Find the names of all person sorted in the descending order using age. | SELECT name FROM Person ORDER BY age DESC |
Which city is "Rensselaer Polytechnic Institute" located in? | SELECT T FROM ( SELECT DISTINCT CASE WHEN chronname = 'Rensselaer Polytechnic Institute' THEN city ELSE NULL END AS T FROM institution_details ) WHERE T IS NOT NULL |
What is the number of games played in the season before 2005? | SELECT SUM(played) FROM table_name_18 WHERE first_game < 2005 |
How many ranks have a Code (IATA/ICAO) of ord/kord? | SELECT COUNT(rank) FROM table_name_29 WHERE code__iata_icao_ = "ord/kord" |
at what location is the last flew on 11 june 2000 | SELECT location FROM table_1997759_1 WHERE last_flew = "11 June 2000" |
Calculate the total quantity of products with name starting with alphabet "c". | SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE SUBSTR(T1.Name, 1, 1) = 'C' |
What is the NBA draft result of the player from Kingston, PA? | SELECT nba_draft FROM table_name_4 WHERE hometown = "kingston, pa" |
what is the maximum # with original airdate being march 14, 2001 | SELECT MAX(_number) FROM table_13956521_2 WHERE original_airdate = "March 14, 2001" |
In what district is the incumbent John Linder? | SELECT district FROM table_19753079_13 WHERE incumbent = "John Linder" |
What is the average year joined of the 277 county? | SELECT AVG(year_joined) FROM table_name_43 WHERE county = 277 |
how many customer orders there | SELECT count ( * ) from Customer_Orders |
What is the highest grid that has +44.866 as the time, with laps greater than 25? | SELECT MAX(grid) FROM table_name_80 WHERE time = "+44.866" AND laps > 25 |
Name the least number for xle02007 | SELECT MIN(no) FROM table_28348757_3 WHERE production_code = "XLE02007" |
What position and how many wins does the forename Fernando have? | Do you mean the position of the driver with forename Fernando when he ranked 1 and the number of times that he ranked 1? | yes | SELECT T2.position, count ( * ) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid where T1.forename = 'Fernando' and rank = 1 |
What is the Equipment that has a Points littler than 442, and a Position of 9? | SELECT equipment FROM table_name_93 WHERE points < 442 AND position = 9 |
What are the different cities listed? | SELECT DISTINCT headquarter FROM manufacturers |
What iwas the attendance of the game that took place on december 6, 1998? | SELECT attendance FROM table_name_41 WHERE date = "december 6, 1998" |
What date was BBC One total viewing greater then 11616996.338225884? | SELECT broadcast_date FROM table_103084_4 WHERE bbc_one_total_viewing > 11616996.338225884 |
Which Album title has a Title of 滑板? | SELECT album_title FROM table_name_53 WHERE title = "滑板" |
please list each item and rating from highest to lowest rating | SELECT T1.title, T2.rating FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id order by T2.rating |
Find the count and code of the job has most employees. | SELECT emp_jobcode , count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1 |
What is their actual resolution? | Select song_name, resolution from song where song_name in ( SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" INTERSECT SELECT song_name FROM song WHERE resolution < 1000 ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.