sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
In which state can you find the highest amount of good performing Account Representatives? | SELECT T2.state FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID INNER JOIN position AS T3 ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative' AND T1.performance = 'Good' GROUP BY T2.state ORDER BY COUNT(T2.state) DESC LIMIT 1 |
What is the score that the player who placed t4 from the united states get? | SELECT score FROM table_name_80 WHERE country = "united states" AND place = "t4" |
What are all names for the position FS? | SELECT name FROM table_14624447_24 WHERE position = "FS" |
When Bianca Manalo won Miss Universe Philippines who was the second runner-up? | SELECT second_runner_up FROM table_name_46 WHERE miss_universe_philippines = "bianca manalo" |
List at least 10 users ID that has 4 as an average ratings of all reviews sent. | SELECT COUNT(user_id) FROM Users WHERE user_average_stars = 4 LIMIT 10 |
What is the record on April 28? | SELECT record FROM table_name_81 WHERE date = "april 28" |
What is the 2010 value with a 1r in 2012 and an A in 2005? | SELECT 2010 FROM table_name_75 WHERE 2012 = "1r" AND 2005 = "a" |
How many female students joined a marines and air force organization? | SELECT COUNT(name) FROM enlist WHERE organ IN ('marines', 'air_force') AND name NOT IN ( SELECT name FROM male ) |
List the names of the customers who have once bought product "food". | SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = "food" GROUP BY T1.customer_id HAVING count(*) >= 1 |
Hello There! Can you provide me with a list of all customer names? | SELECT customer_name FROM customers |
What was Nick Faldo's score? | SELECT score FROM table_name_73 WHERE player = "nick faldo" |
What is the average weight of Japanese cars with 4 cylinders that were produced from 1975 to 1980? | SELECT AVG(T1.weight) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T2.model_year BETWEEN 1975 AND 1980 AND T1.cylinders = 4 AND T3.country = 'Japan' |
what is the rank of mark | select Rank from Faculty where Fname = "Mark" |
What is the name of the following phone number 515.123.4569? Tell me Employer ID | SELECT employee_id, first_name, last_name from employees where phone_number = "515.123.4569" |
How many images have at least 25 attributes? | SELECT COUNT(*) FROM ( SELECT IMG_ID FROM IMG_OBJ_att GROUP BY IMG_ID HAVING COUNT(ATT_CLASS_ID) > 25 ) T1 |
Show names of companies and that of employees in descending order of number of years working for that employee. | SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working |
What is No. 8, when No. 10 is Hunter? | SELECT no_8 FROM table_name_76 WHERE no_10 = "hunter" |
What is the Davao's power (kW)? | SELECT power__kw_ FROM table_name_44 WHERE location = "davao" |
How many papers were published in 2011 in the journal whose short name is "Mol Brain"? | SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 2011 AND T1.ShortName = 'Mol Brain' |
Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10 | SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING sum ( T1.budgeted ) > 100 OR sum ( T3.amount ) > 10 |
What are the names of all the media types? | SELECT name FROM media_types; |
I want to know the number of public universities | SELECT count ( * ) FROM university WHERE affiliation = 'Public' |
What is the address for the Scorpions' mascot? | SELECT address FROM table_name_80 WHERE mascot = "scorpions" |
now how many purchases did members with level 6 make? | SELECT count ( * ) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6 |
Who was the home team of the game at the time of 15:00? | SELECT home FROM table_name_33 WHERE time = "15:00" |
What is the snowfall for ski resort Snowmass? | SELECT MAX(snowfall__in_year_) FROM table_25762852_1 WHERE name = "Snowmass" |
What is the total number in January when the St. Louis Blues had a game smaller than 42? | SELECT COUNT(january) FROM table_name_83 WHERE opponent = "st. louis blues" AND game < 42 |
Count the number of different account types. | SELECT count(DISTINCT acc_type) FROM customer |
In films with a rental rate of 2.99, how many of the films are starred by Nina Soto? | SELECT COUNT(T1.film_id) FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T3.rental_rate = 2.99 AND T2.first_name = 'Nina' AND T2.last_name = 'Soto' |
Provide the name of the location where transaction no.100885 happened. | SELECT T2.LocationName FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.TransactionID = 100885 |
What is the grid number with less than 52 laps and a Time/Retired of collision, and a Constructor of arrows - supertec? | SELECT COUNT(grid) FROM table_name_42 WHERE laps < 52 AND time_retired = "collision" AND constructor = "arrows - supertec" |
Where does the customer with the first name Linda live? And what is her email? | SELECT T2.address , T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA' |
Which class has less in quantity than 174 between the years 1921–23? | SELECT class FROM table_name_43 WHERE quantity < 174 AND date = "1921–23" |
Find the distinct number of president votes. | SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD |
How many goals when more than 10 games played? | SELECT AVG(goals_for) FROM table_name_79 WHERE played > 10 |
list the authors who have submissions to more than one workshop. | SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT ( DISTINCT T1.workshop_id ) > 1 |
What are the descriptions of the service types with product price above 100? | SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 |
How many users belong to the MOBA category? | SELECT COUNT(T2.app_id) FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id WHERE T1.category = 'MOBA' |
Which League that has a Open Cup of 1st round, and a Year of 2009? | SELECT league FROM table_name_99 WHERE open_cup = "1st round" AND year = 2009 |
What is the total number of Year of Intro(s), when Country of Origin is Soviet Union, when Type is Reusable, when Primary Cartridge is 40mm, and when Name/ Designation is RPG-29? | SELECT COUNT(year_of_intro) FROM table_name_87 WHERE country_of_origin = "soviet union" AND type = "reusable" AND primary_cartridge = "40mm" AND name__designation = "rpg-29" |
How many male patients have been described as immune to quadrivalent HPV? | SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'HPV quadrivalent' AND T1.gender = 'M' |
Where did the games that had Wake Forest as Acc Team take place? | SELECT location FROM table_29535057_4 WHERE acc_team = "Wake Forest" |
* I have left the chat * | SELECT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Germany" |
How many events have a time of 1:48.322? | SELECT event FROM table_16308030_1 WHERE time = "1:48.322" |
Give the area code of the city with the white population ranging between 1700 to 2000. | SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.white_population BETWEEN 1700 AND 2000 |
Name the party for tim lee hall | SELECT party FROM table_1341672_14 WHERE incumbent = "Tim Lee Hall" |
What date did episode 10 in the series originally air? | SELECT original_air_date FROM table_27910411_1 WHERE no_in_series = 10 |
What is the ship ID of shipments shipped to the city with the largest area? | SELECT T1.ship_id FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id ORDER BY T2.area DESC LIMIT 1 |
How many times has Sunrisers Hyderabad been the toss winner of a game? | SELECT SUM(CASE WHEN Toss_Winner = ( SELECT Team_Id FROM Team WHERE Team_Name = 'Sunrisers Hyderabad' ) THEN 1 ELSE 0 END) FROM `Match` |
WHAT IS ROOM ID OF MODERN DECOR? | SELECT roomId FROM Rooms WHERE decor = 'modern' |
What player is a cornerback? | SELECT player FROM table_name_57 WHERE position = "cornerback" |
What was the away team that played against Melbourne? | SELECT away_team FROM table_name_96 WHERE home_team = "melbourne" |
What is the name of the department htat has no students minoring in it? | SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO |
Give the abbreviation name for the character "Earl of Westmoreland". | SELECT DISTINCT Abbrev FROM characters WHERE CharName = 'Earl of Westmoreland' |
What are the maximum and minimum number of cities in all markets. | SELECT max ( Number_cities ) , min ( Number_cities ) FROM market |
what is the least capacity (mw) when the rank is less than 46 and the province is newfoundland and labrador? | SELECT MIN(capacity___mw__) FROM table_name_99 WHERE rank < 46 AND province = "newfoundland and labrador" |
How many products are there in the records? | SELECT count(*) FROM catalog_contents |
What is the Outcome of the game with a Score of 6–4, 6–4? | SELECT outcome FROM table_name_45 WHERE score = "6–4, 6–4" |
What is the genre of the movie title with the lowest revenue generated? | SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id ORDER BY T1.revenue LIMIT 1 |
What is the last 10 meetings that have 12 as the games played? | SELECT last_10_meetings FROM table_name_43 WHERE games_played = "12" |
What are the different main industries for all companies? | SELECT DISTINCT main_industry FROM company |
How many speak german? | SELECT number FROM table_name_50 WHERE language = "german" |
What Event has a Position of 1st, a Year of 1983, and a Venue of budapest? | SELECT event FROM table_name_34 WHERE position = "1st" AND year = 1983 AND venue = "budapest" |
Which Video has an Aspect of 16:9? | SELECT video FROM table_name_14 WHERE aspect = "16:9" |
Indicate the complete address of customers located in Lazaro Cardenas. | SELECT street_number, street_name, city, country_id FROM address WHERE city = 'Lazaro Cardenas' |
What is the lost On August 20 | SELECT loss FROM table_name_3 WHERE date = "august 20" |
How many customers live in the city of Prague? | SELECT count(*) FROM customers WHERE city = "Prague"; |
Under what label was the album with the catalog of 3645 and came out later than 1987? | SELECT label FROM table_name_42 WHERE catalog = "3645" AND date > 1987 |
Which Comparative has a Link of sourcecode webserver? | SELECT comparative FROM table_name_43 WHERE link = "sourcecode webserver" |
What is the average number of games in all game types? | SELECT gtype, count ( * ) FROM Video_games GROUP BY gtype |
Did the name change for the program last aired in 1958? | SELECT retitled_as_same FROM table_169766_13 WHERE last_aired = 1958 |
What was the position of the team that used an oldsmobile engine and DNQ? | SELECT finish FROM table_name_10 WHERE engine = "oldsmobile" AND start = "dnq" |
When did Mrs. Ira Deckow have the standard pregnancy test? | SELECT T2.date FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Ira' AND T1.last = 'Deckow' AND T2.description = 'Standard pregnancy test' |
Which away team has an attendance of more than 17,000? | SELECT away_team FROM table_name_30 WHERE crowd > 17 OFFSET 000 |
Name the result for north carolina 9 | SELECT COUNT(result) FROM table_2668329_18 WHERE district = "North Carolina 9" |
What was the time for Screen Your Friend? | SELECT time FROM table_name_48 WHERE winner = "screen your friend" |
What is the average number of years spent working as a journalist? | SELECT AVG(Years_working) FROM journalist |
What is the least number of laps for the driver Jo Siffert? | SELECT MIN(laps) FROM table_name_58 WHERE driver = "jo siffert" |
Show names of musicals which have at least three actors. | SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3 |
How many different players did the most high assists on the March 4 game? | SELECT COUNT(high_assists) FROM table_23286223_8 WHERE date = "March 4" |
What is the total number of people who have no friends living in Austin? | SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin') |
Which player had the score 71-72=143 in Spain? | SELECT player FROM table_name_45 WHERE score = 71 - 72 = 143 AND country = "spain" |
What is the total number of Super Cup, when Title Playoff is "0", when Total is greater than 9, and when League is less than 11? | SELECT COUNT(super_cup) FROM table_name_97 WHERE title_playoff = 0 AND total > 9 AND league < 11 |
What are the profits (in billions) of the company with a market value of 172.9 billion? | SELECT profits__billion_$_ FROM table_1682026_3 WHERE market_value__billion_$_ = "172.9" |
Show the name and location of track with 1 race. | SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1 |
In which region can you find the stores located in the state whose median income is no more than 30,000? | SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Median Income` < 30000 THEN T1.Region END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1.StateCode ) WHERE T IS NOT NULL |
In which season is the runner-up Lase-R/Riga? | SELECT season FROM table_25058269_1 WHERE runner_up = "Lase-R/Riga" |
How long did it take to ride when the laps were 23 and the grid of 13? | SELECT time FROM table_name_65 WHERE laps = 23 AND grid = 13 |
What was the time for the G2 group at the Hobartville Stakes? | SELECT time FROM table_name_62 WHERE group = "g2" AND race = "hobartville stakes" |
What is the smallest rating with nightly rank smaller than 7, timeslot rank smaller than 5 and eposide after episode 6? | SELECT MIN(rating) FROM table_name_27 WHERE rank__night_ < 7 AND rank__timeslot_ < 5 AND episode > 6 |
If the rank is 11, what is the total amount? | SELECT total FROM table_21995420_9 WHERE rank = 11 |
How many values for percentage of marine area are for the Atlantic marine ecozone with an exclusive economic zone area less than 996,439? | SELECT COUNT(percentage_of_marine_area__foreez_) FROM table_name_78 WHERE ecozone = "atlantic marine" AND area__km²__exclusive_economic_zone < 996 OFFSET 439 |
Hmm, I also want to know their years working. | SELECT Driver_ID, Years_Working, If_full_time FROM school_bus |
Which chassis had Rounds of 7, and an Entrant of Ecurie Rosier? | SELECT chassis FROM table_name_15 WHERE rounds = "7" AND entrant = "ecurie rosier" |
What method resulted in a win and a time of 4:36? | SELECT method FROM table_name_44 WHERE res = "win" AND time = "4:36" |
What was the host country when the silver was [[|]] (2) and bronze is czechoslovakia (3)? | SELECT host_country___countries FROM table_name_42 WHERE silver = "[[|]] (2)" AND bronze = "czechoslovakia (3)" |
Name the most common predicate class of image ID 4434. | SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 4434 ORDER BY T2.PRED_CLASS DESC LIMIT 1 |
Find the name of the products that have the color description "red" and have the characteristic name "fast". | 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" |
What is the unemployment rate for the county with a market income per capita of $20,958? | SELECT COUNT(unemployment_rate) FROM table_22815568_2 WHERE market_income_per_capita = "$20,958" |
What were the highest goals against when the position was larger than 19 and the goals smaller than 36? | SELECT MAX(goals_against) FROM table_name_32 WHERE position > 19 AND goals_for < 36 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.