sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Determine the email and Code of employee who are working at United State, state MA | SELECT T1.email, T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.state = 'MA' AND T2.country = 'USA' |
Please list the names of the crytocurrencies that have a total amount of existence of over 10000000 on 2013/4/28. | SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-28' AND T2.total_supply > 10000000 |
What is Score, when Player is "Vijay Singh"? | SELECT score FROM table_name_41 WHERE player = "vijay singh" |
Of the employees who sold Blade, who has the most amount of sales? | SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID ORDER BY T2.Quantity * T3.Price DESC LIMIT 1 |
Count the matches with a total of two innings. | SELECT COUNT(Match_Id) FROM Wicket_Taken WHERE innings_no = 2 |
What's the L3 cache that has a low power part number? | SELECT l3_cache FROM table_name_84 WHERE part_number_s_ = "low power" |
How old is each gender, on average? | SELECT avg(age) , gender FROM Person GROUP BY gender |
What is the highest value for Points, when Games is 21, and when Rank is greater than 2? | SELECT MAX(points) FROM table_name_52 WHERE games = 21 AND rank > 2 |
On February 8, 2014, what is the minimum temperature in the station where store 29 belongs? | SELECT tmin FROM relation AS T1 INNER JOIN weather AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.store_nbr = 29 AND T2.`date` = '2014-02-08' |
Who wrote the episode in the series 46b? | SELECT written_by FROM table_2701851_5 WHERE no_in_series = "46b" |
How many battles resulted in Battle of the Yellow Sea? | SELECT COUNT(result) FROM table_26977890_1 WHERE battles = "Battle of the Yellow Sea" |
How many females were members of the past legislators? | SELECT COUNT(*) FROM historical WHERE gender_bio = 'F' |
Find the average ride duration during the rain of more than 0.8 inches. | SELECT AVG(T1.duration) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE (T2.events = 'Rain' AND T2.precipitation_inches > 0.8) OR (T2.events = 'rain' AND T2.precipitation_inches > 0.8) |
What is the maximum horsepower and the make of the car models with 3 cylinders? | SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1 |
How many people were at the game with a record of 6-1? | SELECT attendance FROM table_name_50 WHERE record = "6-1" |
State the number of male students who do not have payment due. | SELECT COUNT(T1.name) FROM no_payment_due AS T1 INNER JOIN male AS T2 ON T2.name = T1.name WHERE T1.bool = 'pos' |
What was the earliest game with a record of 16–4–3? | SELECT MIN(game) FROM table_name_96 WHERE record = "16–4–3" |
What is the greatest number of Pakistanis admitted to Canada during those times when the number of Nepalis admitted was 627? | SELECT MAX(pakistanis_admitted) FROM table_1717824_3 WHERE nepalis_admitted = 627 |
Return the investors who have invested in two or more entrepreneurs. | SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2 |
How many distinct delegates are from counties with population larger than 50000? | SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000 |
What is the largest number in attendance when the record is 1-1-0? | SELECT MAX(attendance) FROM table_name_63 WHERE record = "1-1-0" |
Show the names and locations of institutions that are founded after 1990 and have the type "Private". | SELECT institution, LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private' |
what's the area (km 2 ) with population census 2009 being 939370 | SELECT area__km_2__ FROM table_1404456_1 WHERE population_census_2009 = 939370 |
Name the first elected for the republican party | SELECT first_elected FROM table_1341865_23 WHERE party = "Republican" |
What tournament location has south korea as the country? | SELECT tournament_location FROM table_name_43 WHERE country = "south korea" |
Which Place has a Player of justin leonard? | SELECT place FROM table_name_48 WHERE player = "justin leonard" |
Among the Most improved Players awarded from 1985-1990, how many player whose country is USA? | SELECT COUNT(DISTINCT T2.playerID) FROM awards_players AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.award = 'Most Improved Player' AND T2.birthCountry = 'USA' AND T1.year BETWEEN 1985 AND 1990 |
Can you tell me which year had more than one festival please? | SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT ( * ) > 1 |
In what season was the winner Dado Dolabella? | SELECT MAX(season) FROM table_25214321_1 WHERE winner = "Dado Dolabella" |
What is Date, when High Rebounds is "Yao Ming (10)"? | SELECT date FROM table_name_86 WHERE high_rebounds = "yao ming (10)" |
Could you please find all the procedure that Jon Wen was trained in? | SELECT * FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" |
Who was the opponent with a points for of 177? | SELECT opponent FROM table_25229283_4 WHERE points_for = 177 |
What is the frequency of Walterboro, SC? | SELECT frequency_mhz FROM table_name_74 WHERE city_of_license = "walterboro, sc" |
Name the Best which has a Qual 2 of 58.700? | SELECT best FROM table_name_47 WHERE qual_2 = "58.700" |
What are the title and director of each film? | SELECT title , directed_by FROM film |
Please give the full name of the customer that have rented the most films. | SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.rental_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1 |
Which studios have an average gross of over 4500000? | SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000 |
How many different descriptions are there for the flag that means decimal digit 2? | SELECT COUNT(description) FROM table_29997112_3 WHERE meaning = "Decimal Digit 2" |
What is the number of the year round school in Los Angeles? | SELECT COUNT(school_year_round) FROM projects WHERE school_city = 'Los Angeles' AND school_year_round = 't' |
What are the lot details of lots associated with transactions with share count smaller than 50? | SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50 |
What was the last year someone was elected to the 14th district? | SELECT MAX(elected) FROM table_13618584_2 WHERE district = "14th" |
Which Season has a Rank smaller than 4, and a Club of barcelona, and less than 115 goals? | SELECT season FROM table_name_61 WHERE rank < 4 AND club = "barcelona" AND goals < 115 |
what is the product price? | SELECT product_price FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1 |
What attendance was on 7 January 2003? | SELECT attendance FROM table_name_14 WHERE date = "7 january 2003" |
Tell me the college/junior club team for pick of 16 | SELECT college_junior_club_team FROM table_name_5 WHERE pick = "16" |
What are the names of the activities Mark Giuliano is involved in | SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = "Mark" AND T1.lname = "Giuliano" |
What is the connection with Australia when the connection with America shows born in the u.s.; mother is u.s. citizen? | SELECT connection_with_australia FROM table_name_74 WHERE connection_with_america = "born in the u.s.; mother is u.s. citizen" |
How many games are held after season 2007? | SELECT count(*) FROM game WHERE season > 2007 |
Which days have a stage of ss11? | SELECT day FROM table_21536557_2 WHERE stage = "SS11" |
How many viewers watched the episode with a story by david simon & mari kornhauser? | SELECT us_viewers__millions_ FROM table_26914076_3 WHERE story_by = "David Simon & Mari Kornhauser" |
What type of bridge is Colton's Crossing Bridge? | SELECT type FROM table_name_46 WHERE name = "colton's crossing bridge" |
What is the full name of the conference in which the paper titled "Extended Fuzzy Regression Models" was published? | SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Extended Fuzzy Regression Models' |
What are the top 10 products with the highest net profit? | SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID GROUP BY T1._ProductID ORDER BY SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) DESC LIMIT 10 |
What provinces encompass the world's biggest desert in terms of overall area? | SELECT Province FROM geo_desert WHERE Desert = ( SELECT Name FROM desert ORDER BY Area DESC LIMIT 1 ) |
How many NFL teams does Stevie Brown play for? | SELECT COUNT(nfl_team) FROM table_20996923_25 WHERE player = "Stevie Brown" |
Please list the Catalan words with an occurrence of over 200000. | SELECT word FROM words WHERE occurrences > 200000 |
What is the area of the corporation named the powell river, the corporation of the city of? | SELECT area__km²_ FROM table_28367242_1 WHERE corporate_name = "Powell River, The Corporation of the City of" |
What are the Wikipedia page names of all the anti-administration senators? | SELECT T1.wikipedia_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'sen' AND T2.party = 'Anti-Administration' |
Who is themens doubles when the mens singles is flemming delfs? | SELECT mens_doubles FROM table_12171145_1 WHERE mens_singles = "Flemming Delfs" |
Who had a qual 1 best of 1:01.704? | SELECT qual_1 FROM table_name_43 WHERE best = "1:01.704" |
What is the name of the racer with a first-qualifying time of 58.991? | SELECT name FROM table_name_76 WHERE qual_1 = "58.991" |
Thank you for that! Would you be able to show me the roller coaster names associated with just Sweden? | SELECT T2.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID where T1.Name = 'Sweden' |
what city does Zach live? | SELECT city from Person where name = 'Zach' |
What is the location of the festival with the largest number of audience? | SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1 |
How much is the minimum salary given to the position with the most complex work? | SELECT minsalary FROM position ORDER BY educationrequired DESC LIMIT 1 |
how many herbs in the product category code? | SELECT COUNT ( * ) FROM Products WHERE product_category_code = "Herbs" |
What are their opening hours, please? | SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" OR How_to_Get_There = "walk" |
What is the highest number of gold medals won by a team that won fewer than 2 silver and fewer than 4 bronze medals? | SELECT MAX(gold) FROM table_name_83 WHERE silver < 2 AND bronze < 4 |
Count the number of countries in Asia. | SELECT count(*) FROM country WHERE continent = "Asia" |
What is the journal's short and full names that feature papers on the "Materials" topic? | SELECT T2.ShortName, T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Keyword LIKE '%Materials%' |
Find the id of the song that lasts the longest. | SELECT f_id FROM files ORDER BY duration DESC LIMIT 1 |
Who has a reported age of 111 years, 66 days? | SELECT name FROM table_name_38 WHERE reported_age = "111 years, 66 days" |
Return all the distinct payment methods used by customers. | SELECT DISTINCT payment_method FROM customers |
What is the sum of the gold medals of the total nation, which has more than 19 silver medals? | SELECT SUM(gold) FROM table_name_74 WHERE nation = "total" AND silver > 19 |
What is the score of the event held on July 23, 2009? | SELECT score FROM table_name_78 WHERE date = "july 23, 2009" |
Name the Apps with a sentiment objectivity of 0.3 and include their number of installs. | SELECT DISTINCT T1.App, T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity = 0.3 |
What is the value for Wins when the Position is 7th? | SELECT wins FROM table_name_67 WHERE position = "7th" |
Which publisher has published the most games? | SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T2.id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T1.publisher_id ORDER BY COUNT(T2.id) DESC LIMIT 1 ) t |
What is the average rating of comic category apps? How many users hold positive attitude towards this app? | SELECT AVG(T1.Rating) , COUNT(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE NULL END) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Category = 'COMICS' |
What is 2009, when Year is "Highest Mean Annual Temperature"? | SELECT 2009 FROM table_name_31 WHERE year = "highest mean annual temperature" |
Which party is associated with the person who was first elected in 1982? | SELECT party FROM table_1341577_43 WHERE first_elected = 1982 |
How many points did Happy Valley score before game 14? | SELECT COUNT(point) FROM table_name_89 WHERE team = "happy valley" AND game < 14 |
What year for the legatum institute? | SELECT year FROM table_name_79 WHERE organization = "legatum institute" |
What is the smallest total that has under 3 golds, more than 0 silvers and bronzes? | SELECT MIN(total) FROM table_name_36 WHERE gold < 3 AND bronze > 0 AND silver > 0 |
On what dates did the student whose personal name is "Karson" enroll in and complete the courses? | SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson" |
Name the total number of years for talbot-lago t26c and points less than 3 | SELECT COUNT(year) FROM table_name_52 WHERE chassis = "talbot-lago t26c" AND points < 3 |
What are the names of the channels owned by CCTV or HBS? | SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' |
For each product type, return the maximum and minimum price. | SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code |
january 15-16 when august 21-22 is august 22, 1979? | SELECT january_15_16 FROM table_25355501_2 WHERE august_21_22 = "August 22, 1979" |
Thank you. Which players play midfielder? | SELECT Player FROM match_season WHERE Position = 'Midfielder' |
In films with a length duration of 113 minutes, how many of the films are starred by Kirk Jovovich? | SELECT COUNT(T1.actor_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.length = 113 AND T1.first_name = 'Kirk' AND T1.last_name = 'Jovovich' |
what is the competition on 21 april 2001? | SELECT competition FROM table_name_75 WHERE date = "21 april 2001" |
What is the average number of courses taught by a professor? | SELECT CAST(COUNT(T1.course_id) AS REAL) / COUNT(DISTINCT T2.p_id) AS num FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 |
Which is the total number of evening gowns for swimsui less than 9.36 and average less than 9.23? | SELECT COUNT(evening_gown) FROM table_name_57 WHERE swimsuit < 9.36 AND average < 9.23 |
Who was the champion earlier than 1978 when the runner-up was Jimmy Connors? | SELECT champion FROM table_name_90 WHERE runner_up = "jimmy connors" AND year < 1978 |
Find the semester and year which has the least number of student taking any class. | SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) LIMIT 1 |
What show had a nomination for best actor in a lead role – female (popular) in 2006? | SELECT for_the_show FROM table_name_22 WHERE category = "best actor in a lead role – female (popular)" AND year = 2006 |
What is the age of the patient with hypertension named Giovanni Russel? | SELECT strftime('%Y', T2.deathdate) - strftime('%Y', T2.birthdate) AS age FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Giovanni' AND T2.last = 'Russel' AND T1.DESCRIPTION = 'Hypertension' |
List the names of all players who have a crossing score higher than 90 and prefer their right foot. | 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.crossing > 90 AND T2.preferred_foot = "right" |
Which college's pick was 14? | SELECT college FROM table_name_86 WHERE pick = "14" |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.