sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the Class AA of the school year 2009-10 with a class AAA of Giddings? | SELECT class_aA FROM table_name_95 WHERE class_aAA = giddings AND school_year = "2009-10" |
What is the name and description for document type code RV? | SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = "RV" |
Find the id and color description of the products with at least 2 characteristics. | SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING count(*) >= 2 |
How many Podiums have a Class of 250cc, and an F laps of 0? | SELECT SUM(podiums) FROM table_name_18 WHERE class = "250cc" AND f_laps = 0 |
Which school has the smallest amount of professors? | SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1 |
please list all items | SELECT * FROM item |
Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments. | SELECT first_name , last_name , department_id FROM employees WHERE salary IN ( SELECT MIN ( salary ) FROM employees GROUP BY department_id ) |
How many students, on average, does each college have enrolled? | SELECT avg(enr) FROM College |
Which Home has a Tie no of 6? | SELECT home_team FROM table_name_26 WHERE tie_no = "6" |
What is the profit for part no.98768 in order no.1? | SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey WHERE T1.l_orderkey = 1 AND T1.l_partkey = 98768 |
Which department has the highest average student GPA, and what is the average gpa? | SELECT T2.dept_name , avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1 |
How many assists did the player who had 121 rebounds have? | SELECT MAX(assists) FROM table_24850487_5 WHERE rebounds = 121 |
Which Overall has a Round of 7? | SELECT MIN(overall) FROM table_name_99 WHERE round = 7 |
List top 3 highest Rating TV series. List the TV series's Episode and Rating. | SELECT Episode, Rating FROM TV_series ORDER BY Rating DESC LIMIT 3 |
Name cellphone number's Type ID? | SELECT PhoneNumberTypeID FROM PhoneNumberType WHERE Name = 'Cell' |
Can you give me the top three wineries with the most white wines? | SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = "White" GROUP BY T2.Winery ORDER BY count ( * ) DESC LIMIT 3 |
How many customers use a Yahoo! Mail e-mail address? | SELECT COUNT(*) FROM customer WHERE email LIKE '%@yahoo.com' |
Count the number of different directors. | SELECT COUNT (DISTINCT director) FROM movie |
Find the first name and country code of the oldest player. | SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1 |
How many people scored the most points during the game on December 10? | SELECT COUNT(high_points) FROM table_27756014_6 WHERE date = "December 10" |
Hmm, please show me names of the drivers who are younger than 40. | SELECT name FROM driver WHERE age < 40 |
Which game was released in 2011? | SELECT game FROM table_name_13 WHERE year = 2011 |
Show different tourist attractions' names, ids, and the corresponding number of visits. | SELECT T1.Name , T2.Tourist_Attraction_ID , COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID |
What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst? | SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" AND T2.staff_last_name = "Berge" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Ashley" AND T2.staff_last_name = "Medhurst" |
What venue listed is dated February 22, 2003? | SELECT venue FROM table_name_4 WHERE date = "february 22, 2003" |
List the ingredients in Tomato-Cucumber Relish. | SELECT T3.name FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Tomato-Cucumber Relish' |
What is the total number of CFL teams in the college Wilfrid Laurier | SELECT COUNT(cfl_team) FROM table_15817998_5 WHERE college = "Wilfrid Laurier" |
What is the Finish on June 1, 2008? | SELECT finish FROM table_name_61 WHERE date = "june 1, 2008" |
When was there a bye result? | SELECT date FROM table_name_32 WHERE result = "bye" |
List out the number of female students who enlisted in the air force. | SELECT COUNT(name) FROM enlist WHERE organ = 'air_force' AND name NOT IN ( SELECT name FROM male ) |
What is the description of the color used by least products? | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1 |
The 147.481 Qual, happened in what year? | SELECT year FROM table_name_15 WHERE qual = "147.481" |
Show all region code and region name sorted by the codes. | SELECT region_code, region_name FROM region ORDER BY region_code |
What is Best, when Name is Jimmy Vasser? | SELECT best FROM table_name_17 WHERE name = "jimmy vasser" |
What division did the Nashville Metros play in during the year that they did not qualify for the Playoffs, where in the USL PDL League, and had the Regular Season 7th, Southeast? | SELECT division FROM table_name_96 WHERE playoffs = "did not qualify" AND league = "usl pdl" AND regular_season = "7th, southeast" |
What position is for Dr. Phillips high school? | SELECT position FROM table_name_94 WHERE school = "dr. phillips high school" |
What is the Home team of Tie no 2? | SELECT home_team FROM table_name_20 WHERE tie_no = "2" |
Can you order them by genre? | SELECT min ( T1.duration ) , T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is order by T2.genre_is |
How many players had 12 wickets? | SELECT COUNT(player) FROM table_27922491_8 WHERE wickets = 12 |
What is the total for the player with more snatches than 87.5 and bodyweight more than 74.8? | SELECT AVG(total__kg_) FROM table_name_7 WHERE snatch > 87.5 AND bodyweight > 74.8 |
Calculate the service of GDP for Brazil. | SELECT T2.Service * T2.GDP FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Brazil' |
Show the role description and the id of the project staff involved in most number of project outcomes? | SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1 |
What is the hometown of the youngest teacher? | SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1 |
What is the sum of the attendance during the game against the philadelphia eagles after week 9? | SELECT SUM(attendance) FROM table_name_58 WHERE opponent = "philadelphia eagles" AND week > 9 |
Which republican was first elected in 1886 in the district of ohio 17? | SELECT result FROM table_name_16 WHERE party = "republican" AND first_elected = "1886" AND district = "ohio 17" |
Which conference has the nickname Chargers? | SELECT current_conference FROM table_1973729_2 WHERE nickname = "Chargers" |
is there any person friend for this persons | 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' INTERSECT SELECT T3.name FROM Person AS T4 JOIN PersonFriend AS T3 ON T4.name = T3.friend |
What is the FSB of the model with part number lf80537ge0251mn? | SELECT fsb FROM table_11602313_4 WHERE part_number_s_ = "LF80537GE0251MN" |
What is 4zr's callsign? | SELECT callsign FROM table_name_67 WHERE on_air_id = "4zr" |
What is the date of the match with a winner outcome and jim courier as the opponent in the final? | SELECT date FROM table_name_27 WHERE outcome = "winner" AND opponent_in_the_final = "jim courier" |
How many male legislators are Roman Catholic? | SELECT COUNT(*) FROM current WHERE religion_bio = 'Roman Catholic' AND gender_bio = 'M' |
How many females use ZUK Z1 phones in the age group under 23? | SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.device_model = 'Z1' AND T1.`group` = 'F23-' AND T2.phone_brand = 'ZUK' |
What is Assembled, when Summoned is "6 October 1297"? | SELECT assembled FROM table_name_55 WHERE summoned = "6 october 1297" |
Gold larger than 0, and a Bronze larger than 1 includes what total number of silver? | SELECT COUNT(silver) FROM table_name_31 WHERE gold > 0 AND bronze > 1 |
What are the first names of students in room 108? | SELECT firstname FROM list WHERE classroom = 108 |
What is the average Acquired when the Number shows as 7? | SELECT AVG(acquired) FROM table_name_73 WHERE number = 7 |
List down the company names that have the highest reorder level. | SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ) |
I want the total number of points for against of 753 and points diff more than -114 | SELECT COUNT(points) FROM table_name_75 WHERE against = 753 AND points_diff > -114 |
What is the score of the away team that played home team Geelong? | SELECT away_team AS score FROM table_name_18 WHERE home_team = "geelong" |
Show the crime rate of counties with a city having white percentage more than 90. | SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90 |
Name the pinyin for ciá-ìng-gâing | SELECT pinyin FROM table_2013618_1 WHERE foochow = "Ciá-ìng-gâing" |
What are the distinct unit prices of all tracks? | SELECT DISTINCT (UnitPrice) FROM TRACK |
What was the score of the game where Philadelphia was the visitor? | SELECT score FROM table_name_84 WHERE visitor = "philadelphia" |
Who's the opponent of the game with the record 64-51? | SELECT opponent FROM table_name_60 WHERE record = "64-51" |
What is the count of aircrafts that have a distance between 1000 and 5000? | SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000 |
What are the teams of the players, sorted in ascending alphabetical order? | SELECT Team FROM player ORDER BY Team ASC |
Name the couty for others% 5.8 | SELECT county FROM table_23014476_1 WHERE others__percentage = "5.8" |
What was the average week for the gaime against the philadelphia eagles with less than 31,066 in attendance? | SELECT AVG(week) FROM table_name_14 WHERE opponent = "philadelphia eagles" AND attendance < 31 OFFSET 066 |
For the race held on 10/08/86, what was the circuit? | SELECT circuit FROM table_name_11 WHERE date = "10/08/86" |
Who is the lead for the team with Nkeiruka Ezekh as second? | SELECT lead FROM table_name_59 WHERE second = "nkeiruka ezekh" |
Identify recipes with different maximum and minimum quantities. | SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.max_qty <> T2.min_qty |
Show the tourist attractions visited by the tourist whose detail is 'Vincent'. | SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = "Vincent" |
What is the result for salmonella spp. if you use citrate? | SELECT COUNT(citrate) FROM table_16083989_1 WHERE species = "Salmonella spp." |
Show all track names that have had no races. | SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race) |
What position does Hedo Türkoğlu play? | SELECT position FROM table_name_93 WHERE player = "hedo türkoğlu" |
Name the try bonus for kenfig hill rfc | SELECT try_bonus FROM table_13564702_3 WHERE club = "Kenfig Hill RFC" |
What category has showest award for the category awards? | SELECT category FROM table_name_9 WHERE award = "showest award" |
Among the films that are released in 2006, how many of them are rated Adults Only in the Motion Picture Association Film Rating? | SELECT COUNT(film_id) FROM film WHERE rating = 'NC-17' AND release_year = 2006 |
Which label is from the Germany region? | SELECT label FROM table_name_52 WHERE region = "germany" |
What is the official name of the municipality whose name in Spanish is Cripán? | SELECT official_name FROM table_300283_1 WHERE name_in_spanish = "Cripán" |
Name the Player who has a To par of –2 and a Score of 69-73=142? | SELECT player FROM table_name_74 WHERE to_par = "–2" AND score = 69 - 73 = 142 |
Which Melbourne had a gold coast and sydney which were yes, but an adelaide that was no? | SELECT melbourne FROM table_name_59 WHERE gold_coast = "yes" AND adelaide = "no" AND sydney = "yes" |
Tell the number of 4-year private not-for-profit schools in the home state of "Brevard Community College". | SELECT COUNT(T1.chronname) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T2.level = '4-year' AND T2.control = 'Private not-for-profit' AND T1.chronname = 'Brevard Community College' |
How many names are in the name column? | SELECT count ( distinct name ) FROM PersonFriend |
What is the highest number lost when the number tied is more than 42, the years are less than 132, and the PCT is less than 0.5729000000000001? | SELECT MAX(lost) FROM table_name_57 WHERE tied > 42 AND years < 132 AND pct < 0.5729000000000001 |
What is their description? | SELECT Document_Description FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project' |
What is the average fee for a CSU campus in the year of 1996? | SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996 |
Find the names of customers whose name contains "Diana". | SELECT customer_details FROM customers WHERE customer_details LIKE "%Diana%" |
What medication did Elly Koss take when she had Streptococcal sore throat? | SELECT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.reasondescription = 'Streptococcal sore throat (disorder)' |
Give the web site address for "Swarthmore College". | SELECT T FROM ( SELECT DISTINCT CASE WHEN chronname = 'Swarthmore College' THEN site ELSE NULL END AS T FROM institution_details ) WHERE T IS NOT NULL |
What is the smallest round associated with Samuel Scheschuk? | SELECT MIN(round) FROM table_name_54 WHERE name = "samuel scheschuk" |
Which season had a result of 1–0 (aet)? | SELECT season FROM table_27274566_2 WHERE result = "1–0 (aet)" |
Who was the writer of episode 15? | SELECT writer_s_ FROM table_25800134_4 WHERE season__number = 15 |
Which department has the least number of employees? | SELECT * FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY count ( departmentID ) LIMIT 1 |
What is the highest CPC blend Kazakhstan number when Barrow Island Australia is smaller than 12? | SELECT MAX(cpc_blend_kazakhstan) FROM table_name_48 WHERE barrow_island_australia < 12 |
What is the lowest total medals when there were 0 gold medals, 0 silver medals, and more than 1 bronze medal? | SELECT MIN(total) FROM table_name_77 WHERE bronze > 1 AND silver = 0 AND gold < 0 |
What were the penalty minutes in 1923's Stanley Cup finals of the team that ranked second in that year? | SELECT T1.PIM FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1923' AND T2.rank = 2 |
Who was on Jason's team for the 12 June 2009 episode? | SELECT jasons_team FROM table_23292220_8 WHERE first_broadcast = "12 June 2009" |
How many users with a long tip and 2 likes for their tip have a high number of fans? | SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T2.tip_length = 'Long' AND T2.likes = 2 AND T1.user_fans = 'High' |
In what Year is Keith Smith's Cross Code Debut RL Test v Wales? | SELECT year FROM table_name_73 WHERE cross_code_debut = "rl test v wales" AND player = "keith smith" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.