sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
List down the customer names with a disputed order status. | SELECT t1.customerName FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'Disputed' |
How many field goals did Carter get when he had 0 extra points? | SELECT SUM(field_goals) FROM table_name_14 WHERE player = "carter" AND extra_points < 0 |
Name the former codes for merged into panama ( pa , pan , 591 ) | SELECT former_codes FROM table_222666_1 WHERE new_country_names_and_codes = "Merged into Panama ( PA , PAN , 591 )" |
what is the customer number of Kayley | SELECT customer_number FROM Customers WHERE customer_name = "Kayley" |
what is the highest pick for the position tight end? | SELECT MAX(pick) FROM table_name_20 WHERE position = "tight end" |
What are the allergy types and how many allergies correspond to each one? | SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype |
Look for the movie title with the keyword of "angel". | SELECT T1.title FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'angel' |
What is the smallest Year with a Binibining Pilipinas-International of jessie alice salones dixson? | SELECT MIN(year) FROM table_name_90 WHERE binibining_pilipinas_international = "jessie alice salones dixson" |
How many tweets are on the topic intern | SELECT count ( * ) FROM tweets WHERE text LIKE '%intern%' |
What is the Tie no when Wimbledon is the home team? | SELECT tie_no FROM table_name_12 WHERE home_team = "wimbledon" |
How much taller is David Bornhammar than Pauli Levokari in centimeters? | SELECT ( SELECT T2.height_in_cm FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'David Bornhammar' ) - ( SELECT T2.height_in_cm FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'Pauli Levokari' ) |
What is the payment method code and party phone of the party with the email '[email protected]'? | SELECT payment_method_code , party_phone FROM parties WHERE party_email = "[email protected]" |
Which Surface has a Partner of galina voskoboeva? | SELECT surface FROM table_name_45 WHERE partner = "galina voskoboeva" |
Provide the language used by the people of Belize. | SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belize' |
What is the word pair that occured the highest amount of times in Addicio? Indicate how many times such word pair occured. | SELECT T3.w1st, T3.w2nd, T3.occurrences FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid INNER JOIN biwords AS T3 ON T2.wid = T3.w1st OR T2.wid = T3.w2nd WHERE T1.title = 'Addicio' ORDER BY T3.occurrences DESC LIMIT 1 |
Find the full name of employee who supported the most number of customers. | SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1 |
What are the names of all instructors with names that include "dar"? | SELECT name FROM instructor WHERE name LIKE '%dar%' |
Who was the opponent when 48,121 people attended? | SELECT opponent FROM table_name_49 WHERE attendance = "48,121" |
What was her Giant Slalom score when her Overall was greater than 3 and her Super G score was 12? | SELECT Giant AS slalom FROM table_name_28 WHERE overall > 3 AND super_g = 12 |
Among the users who received high compliments from other users, which users joined Yelp earliest? | SELECT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T2.number_of_compliments = 'High' AND T1.user_yelping_since_year = ( SELECT MIN(user_yelping_since_year) FROM Users ) |
Who was the architect that built the Electric Railway Chambers before 1915? | SELECT architect FROM table_name_43 WHERE built < 1915 AND building = "electric railway chambers" |
List the countries of universities that scored 70 and below in 2016. | SELECT DISTINCT T3.country_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.score < 70 AND T2.year = 2016 |
What instruments did the musician with the last name "Heilo" play in the song "Le Pop"? | SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Le Pop" |
What is listed for Played that has Points against of 263? | SELECT played FROM table_name_33 WHERE points_against = "263" |
When we played Houston who had the most points? | SELECT high_points FROM table_22879323_6 WHERE team = "Houston" |
Count the number of authors. | SELECT count(*) FROM authors |
List the customers first and last name of 10 least expensive invoices. | SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10; |
How many different templates do all document use? | SELECT count(DISTINCT template_id) FROM Documents |
Find the number of cartoons directed by each of the listed directors. | SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by |
what is the tonnage grt of the ship author? | SELECT tonnage_grt FROM table_name_40 WHERE ship = "author" |
Find the names of users who do not have a first notification of loss record. | SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id |
What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction? | SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "254 Ottilie Junction" OR T2.How_to_Get_There = "bus" |
What is the First Issue date of Bamboo Blade? | SELECT first_issue FROM table_name_89 WHERE title = "bamboo blade" |
What are the poll sources of those support rates? | SELECT Poll_Source FROM candidate ORDER BY support_rate DESC LIMIT 3 |
Where Class AAA is Atlanta and Class AA is Weimar, what is Class AAAAA? | SELECT class_aAAAA FROM table_name_65 WHERE class_aAA = atlanta AND class_aA = weimar |
Which manufacturer has the most number of shops? List its name and year of opening. | SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1 |
what are the characteristics of the product name 'sesame'? | SELECT t2.characteristic_id FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame" |
How many new conferences are in the NCLL deep south conference? | SELECT COUNT(new_conference) FROM table_26476336_2 WHERE new_classification = "NCLL Deep South Conference" |
What are the movie titles and average rating of the movies with the lowest average rating? | SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1 |
Find names and times of trains that run through stations for the local authority Chiltern. | SELECT t3.name , t3.time FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern"; |
Show the country where people older than 30 and younger than 25 are from. | SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30 |
Who is the person that has no friend? | SELECT name FROM person EXCEPT SELECT name FROM PersonFriend |
Who won silver in the year before 2010, the year Chan Ming Shu won gold? | SELECT silver FROM table_name_21 WHERE year < 2010 AND gold = "chan ming shu" |
in round 9 who was the 250cc winner? | SELECT 250 AS cc_winner FROM table_15299235_1 WHERE round = 9 |
which episode did sarah millican and grayson perry appear in | SELECT MIN(episode) FROM table_29135051_3 WHERE guest_s_ = "Sarah Millican and Grayson Perry" |
What date was the game played in seattle center coliseum 12,126? | SELECT date FROM table_27902171_7 WHERE location_attendance = "Seattle Center Coliseum 12,126" |
Venue of melbourne , australia, and a Extra of 200 m has what results? | SELECT result FROM table_name_90 WHERE venue = "melbourne , australia" AND extra = "200 m" |
how many first performances where performer is wilfred engelman category:articles with hcards | SELECT COUNT(first_performance) FROM table_19189856_1 WHERE performer = "Wilfred Engelman category:Articles with hCards" |
What is the average age of all the dogs? | SELECT avg(age) FROM Dogs |
Show the names of all ships from United States? | SELECT Name FROM ship WHERE Nationality = "United States" |
What year was California State University-Chico started? | SELECT year from campuses where campus = "California State University-Chico" |
What is the code of the city with the most students? | SELECT city_code FROM student GROUP BY city_code ORDER BY count(*) DESC LIMIT 1 |
Find id of the candidate whose email is [email protected]? | SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = "[email protected]" |
How many games did each team played? | SELECT MIN(games_played) FROM table_18018214_3 |
Find the first names of all customers that live in Brazil and have an invoice. | SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Brazil" |
Who were the candidates when the first elected was a republican in 1998? | SELECT candidates FROM table_1805191_14 WHERE first_elected = 1998 AND party = "Republican" |
Find the first names of students who took exactly one class. | SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING count(*) = 1 |
List the name of the county with the largest population. | SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1 |
Find the titles of papers whose first author is affiliated with an institution in the country "Japan" and has last name "Ohori"? | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "Japan" AND t2.authorder = 1 AND t1.lname = "Ohori" |
What is the drawn that has 22 for played, and 96 for points? | SELECT drawn FROM table_name_96 WHERE played = "22" AND points = "96" |
How many unemployed students have never been absent? | SELECT COUNT(T2.name) FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.month = 0 |
What are all the reports where Paul Tracy had the fastest lap? | SELECT report FROM table_11056278_3 WHERE fastest_lap = "Paul Tracy" |
What is the total amount of grant money for research? | SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research' |
Calculate the win rate of the toss-winners in 2012. | SELECT CAST(SUM(CASE WHEN Toss_Winner = Match_Winner THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN Match_Date LIKE '2012%' THEN 1 ELSE 0 END) FROM `Match` |
What is 1997, when 2003 is 0 / 4? | SELECT 1997 FROM table_name_22 WHERE 2003 = "0 / 4" |
Which distinct source system code includes the substring 'en'? | SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%' |
Name the rufus guest for 15 december 2008 | SELECT COUNT(rufus_guest) FROM table_19930660_1 WHERE first_broadcast = "15 December 2008" |
Which Nationality has a Player of rudy poeschek? | SELECT nationality FROM table_name_51 WHERE player = "rudy poeschek" |
What surface did Smeets play on during the Kuwait tournament? | SELECT surface FROM table_name_30 WHERE tournament = "kuwait" |
What is the Name for 1997–99? | SELECT name FROM table_name_76 WHERE year = "1997–99" |
What Call sign shows an ERP W of 80? | SELECT call_sign FROM table_name_93 WHERE erp_w = 80 |
List the name of enzymes in descending lexicographical order. | SELECT name FROM enzyme ORDER BY name DESC |
Please list the titles of all the films that have more than 2 special features. | SELECT title FROM ( SELECT title, COUNT(special_features) AS num FROM film GROUP BY title ) AS T ORDER BY T.num > 2 |
Name the vendors that sell the item Classroom Keepers Management Center. | SELECT DISTINCT vendor_name FROM resources WHERE item_name = 'Classroom Keepers Management Center' |
Identify the customer, which placed the largest order in terms of value. | SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID GROUP BY T2.CustomerID ORDER BY SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) DESC LIMIT 1 |
State the company name of all suppliers in USA. | SELECT CompanyName FROM Suppliers WHERE Country = 'USA' |
what is the name of the manufacturer whose headquarter is in Los Angeles? | SELECT name FROM manufacturers WHERE Headquarter = "Los Angeles" |
What is the highest number of bronze medals for nations with under 0 golds? | SELECT MAX(bronze) FROM table_name_46 WHERE gold < 0 |
Which season is Euroleague with Greek Cup? | SELECT season FROM table_name_4 WHERE european_cup = "euroleague" AND national_cup = "greek cup" |
Find the number of investors in total. | SELECT count(*) FROM INVESTORS |
Show the head portrait of the user who gave the most "5" ratings. | SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_score = 5 |
what is the city of San Jose Civic Center | select city from station where name = "San Jose Civic Center" |
What is the Standard cost (USD) by hans Oischinger Creator ? | SELECT standard_cost__usd_ FROM table_name_27 WHERE creator = "hans oischinger" |
How many of the apps belong in the "Equity Fund" category? | SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T2.category = 'Equity Fund' |
When 1472 was the elected when was the assembled? | SELECT assembled FROM table_1827690_4 WHERE elected = "1472" |
Great - can you tell me the names of students in the Accounting department with a GPA above 3.0? | SELECT T2.stu_fname, T2.stu_lname from department as T1 join student as T2 on T1.dept_code = T2.dept_code where T1.dept_name = "Accounting" and T2.stu_GPA > 3.0 |
What are the names of customers with accounts, and what are the total savings balances for each? | SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name |
What are the names of all colleges that have an enrollment less than at least one of the colleges in FL? | SELECT DISTINCT cName FROM college WHERE enr < ( SELECT max ( enr ) FROM college WHERE state = 'FL' ) |
Name the least division | SELECT MIN(division) FROM table_2361911_2 |
Which major metropolitan area had a land area of 23.80? | SELECT metropolitan_area FROM table_22916979_1 WHERE land_area__mi_2__ = "23.80" |
List the actors' IDs who have "KILMER" as last name. | SELECT actor_id FROM actor WHERE last_name = 'KILMER' |
How many contestants had a starting bmi of 33.1? | SELECT COUNT(finale_weight) FROM table_28654454_5 WHERE starting_bmi = "33.1" |
Find the level name of the catalog with the lowest price (in USD). | SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1 |
What is the average expenditures on R&D for Croatia after 2007? | SELECT AVG(expenditures_on_r) & d__billions_of_us$_, _ppp__ FROM table_name_32 WHERE country_region = "croatia" AND year > 2007 |
Which Ends have a Name of zambrano? | SELECT MAX(ends) FROM table_name_41 WHERE name = "zambrano" |
How many positions does Trent Bagnail play? | SELECT COUNT(position) FROM table_28059992_5 WHERE player = "Trent Bagnail" |
How many picks does chad owens have? | SELECT COUNT(pick__number) FROM table_name_47 WHERE name = "chad owens" |
List the app users IDs and installed status for the event ID of 844. | SELECT app_id , IIF(is_installed = 1, 'YES', 'NO') AS status FROM app_events WHERE event_id = 844 |
How many 1st leg have team 1 ofk belgrade? | SELECT COUNT(1 AS st_leg) FROM table_19294812_2 WHERE team_1 = "OFK Belgrade" |
How many games had a deficit of 175? | SELECT COUNT(played) FROM table_18505065_1 WHERE against = 175 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.