sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the 3 most common cloud cover rates in the region of zip code 94107? | SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3 |
Can you find me the average number of followers for these users? | SELECT avg ( followers ) FROM user_profiles WHERE UID IN ( SELECT UID FROM tweets ) |
How many menus with the name "Waldorf Astoria" have 4 pages? | SELECT COUNT(*) FROM Menu WHERE name = 'Waldorf Astoria' AND page_count = 4 |
What season was there a 2nd place finish? | SELECT season FROM table_name_81 WHERE position = "2nd" |
What is Nancy Edwards's address? | SELECT address FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards"; |
Name the aspect ratio for 720 | SELECT aspect_ratio FROM table_15928363_1 WHERE horizontal = 720 |
What is the lowest crowd size at MCG? | SELECT MIN(crowd) FROM table_name_91 WHERE venue = "mcg" |
What is the id and name of the enzyme with most number of medicines that can interact as 'activator'? | SELECT T1.id , T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1 |
Which loss had a record of 79-49? | SELECT loss FROM table_name_7 WHERE record = "79-49" |
Who is the player with a 68-67-75=210 score? | SELECT player FROM table_name_29 WHERE score = 68 - 67 - 75 = 210 |
What is the share count of transaction id 2? | SELECT share_count FROM TRANSACTIONS where transaction_id = 2 |
For the game played on November 29, who had the highest rebounds? | SELECT high_rebounds FROM table_name_73 WHERE date = "november 29" |
List the names of disabled students enlisted in the navy. | SELECT T1.name FROM enlist AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.organ = 'navy' |
What is the name of the linebacker at Illinois college? | SELECT player_name FROM table_10361625_1 WHERE position = "Linebacker" AND college = "Illinois" |
How many Points have a Drawn smaller than 0? | SELECT COUNT(points) FROM table_name_36 WHERE drawn < 0 |
How many students are enrolled in college? | SELECT sum(enr) FROM College |
What's the Material collected for the 978-1401209674 ISBN? | SELECT material_collected FROM table_name_75 WHERE isbn = "978-1401209674" |
What is the average number of goals of the player with 234 apps and a rank above 8? | SELECT AVG(goals) FROM table_name_13 WHERE apps = 234 AND rank < 8 |
What is the round for the Int. Adac-Preis Der Tourenwagen Von Sachsen-Anhalt? | SELECT round FROM table_name_92 WHERE race = "int. adac-preis der tourenwagen von sachsen-anhalt" |
find the names of people who are taller than 200 or lower than 190. | SELECT name FROM people WHERE height > 200 OR height < 190 |
List the name, nationality and id of all male architects ordered by their names lexicographically. | SELECT name , nationality , id FROM architect WHERE gender = 'male' ORDER BY name |
What would the LCD screen size and pixels be for the coolpix 5700? | SELECT lcd_screen_size, _pixels FROM table_name_93 WHERE model = "coolpix 5700" |
Name the category for 2013 | SELECT category FROM table_name_15 WHERE year = "2013" |
What horses does r. a. Scott own? | SELECT horse FROM table_19624708_1 WHERE owner = "R. A. Scott" |
How many papers are published by the institution "Tokohu University"? | SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Tokohu University" |
How many complaints did each customer file? | Did you want the customer ids and number of complaints fold for each customer? | Yes, please. | SELECT customer_id, COUNT ( * ) FROM Complaints GROUP BY customer_id |
What numbered pick attended western ontario and is an OL? | SELECT pick__number FROM table_24540893_6 WHERE school = "Western Ontario" AND position = "OL" |
What were the resources that were requested by the teacher for project "d6ef27c07c30c81f0c16c32b6acfa2ff"? Indicate the quantities as well and whether or not the teacher acquired P.h.D or doctor degree. | SELECT DISTINCT T1.item_name, T1.item_quantity, T2.teacher_prefix FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.projectid = 'd6ef27c07c30c81f0c16c32b6acfa2ff' |
Who earns the highest salary? | SELECT name FROM instructor ORDER BY salary DESC LIMIT 1 |
Please list the territories whose sales are taken in charge by the employees who report to Andrew Fuller. | SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.ReportsTo = ( SELECT EmployeeID FROM Employees WHERE FirstName = 'Andrew' AND LastName = 'Fuller' ) |
How many episodes have the Netflix episode number S08E04? | SELECT COUNT(episode) FROM table_15187735_15 WHERE netflix = "S08E04" |
What is the longest trip duration that started and ended August 29, 2013? | SELECT MAX(duration) FROM trip WHERE start_date LIKE '8/29/2013%' AND end_date LIKE '8/29/2013%' |
How many budget record has a budget amount smaller than the invested amount? | SELECT count(*) FROM budget WHERE budgeted < invested |
What's the sSpec number of the processor having an ultra-low power I/O? | SELECT sspec_number FROM table_name_57 WHERE i_o_bus = "ultra-low power" |
Which FIFA Club World Championship has a UEFA Champions League of 0, and a Total smaller than 3, and a Name of geremi? | SELECT MIN(fifa_club_world_championship) FROM table_name_56 WHERE uefa_champions_league = 0 AND total < 3 AND name = "geremi" |
Who was the opponent for the game on November 20, 1955? | SELECT opponent FROM table_name_35 WHERE date = "november 20, 1955" |
What is the average total number of medals when there were 4 bronze, more than 2 silver, and less than 7 gold medals? | SELECT AVG(total) FROM table_name_26 WHERE bronze = 4 AND silver > 2 AND gold < 7 |
What is the pick# from South Dakota college? | SELECT pick__number FROM table_name_23 WHERE college = "south dakota" |
What is the highest swimsuit score of the contestant with a higher than 9.55 interview score, and evening gown of 9.75, and an average higher than 9.67? | SELECT MAX(swimsuit) FROM table_name_63 WHERE interview > 9.55 AND evening_gown = 9.75 AND average > 9.67 |
Order them by benefit ID, Please. | SELECT T1.source_system_code , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id |
How many order items correspond to each order id? | SELECT order_id , count(*) FROM Order_items GROUP BY order_id |
Show each location and the number of cinemas there. | SELECT LOCATION , count(*) FROM cinema GROUP BY LOCATION |
how many Customers are there | SELECT count ( * ) from Customers |
What is the Frequency in Davao City? | SELECT frequency FROM table_name_91 WHERE location = "davao city" |
Find the name of organizations whose names contain "Party". | SELECT organization_name FROM organizations WHERE organization_name LIKE "%Party%" |
How many rounds did Brett go against Kevin Asplund? | SELECT COUNT(round) FROM table_name_72 WHERE opponent = "kevin asplund" |
What are flight numbers of flights departing from City "Aberdeen "? | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" |
What is the position of the player who is taller than 2.12? | SELECT position FROM table_name_30 WHERE height > 2.12 |
What was the speed of the rider that earned 1 point? | SELECT speed FROM table_name_24 WHERE points = 1 |
Show the names of products that are in at least two events in ascending alphabetical order of product name. | SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT ( * ) > = 2 ORDER BY T1.Product_Name |
Who is the Pro-Administration senator that runs from March 4, 1789 to December 31, 1791? | SELECT T1.first_name, T1.last_name FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Pro-Administration' AND T2.start = '1789-03-04' AND T2.end = '1791-12-31' |
Find the year that offers the largest number of courses? | SELECT YEAR FROM SECTION GROUP BY semester , YEAR ORDER BY count ( * ) DESC LIMIT 1 |
What inclination has a semimajor axis of 20 au? | SELECT inclination FROM table_name_16 WHERE semimajor_axis___au__ = "20 au" |
what is the average points when goals conceded is 14 and goals scored is less than 32? | SELECT AVG(points) FROM table_name_97 WHERE goals_conceded = 14 AND goals_scored < 32 |
What is the callsign of Cagayan de Oro with 5kW? | SELECT callsign FROM table_name_81 WHERE power__kw_ = "5kw" AND location = "cagayan de oro" |
For the city whose land area was 135.09, what was the total population density? | SELECT population_density__people_per_mi_2__ FROM table_22916979_1 WHERE land_area__mi_2__ = "135.09" |
What is the country of the Representative that left office as incumbent? | SELECT country FROM table_name_29 WHERE left_office = "incumbent" |
When did the episode that had 5.09 million total viewers (both Live and SD types) first air? | SELECT original_airdate FROM table_24222929_3 WHERE live + sd_total_viewers = "5.09 million" |
Who directed episode 11 of the season? | SELECT director FROM table_28785738_1 WHERE no_in_season = 11 |
What label is released on September 20, 2005? | SELECT label FROM table_name_16 WHERE date_of_release = "september 20, 2005" |
Which region does territory id 2116 belong to? | SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryID = 2116 |
What is the percentage of the most common conditions for patients age 60 and above? | SELECT CAST(SUM(CASE WHEN T5.DESCRIPTION = T3.DESCRIPTION THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.patient) FROM ( SELECT T2.DESCRIPTION, T1.patient FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE ROUND((strftime('%J', T2.START) - strftime('%J', T1.birthdate)) / 365) > 60 GROUP BY T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1 ) AS T3 INNER JOIN patients AS T4 ON T3.patient = T4.patient INNER JOIN conditions AS T5 ON T4.patient = T5.PATIENT WHERE ROUND((strftime('%J', T5.START) - strftime('%J', T4.birthdate)) / 365) > 60 |
What are the full names of the 3 instructors who teach the most courses? | SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3 |
What is the nationality of the ship with maximum tonnage? | SELECT Nationality FROM ship order by Tonnage desc limit 1 |
How many times is the number of territories in "Eastern Region" than "Southern Region"? | SELECT CAST(( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ) AS REAL) / ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern' ) AS Calu |
what is round1 when round3 is less than 51, total points is less than 273, round2 is less than 98 and round5 is less than 24? | SELECT AVG(round1) FROM table_name_62 WHERE round3 < 51 AND total_points < 273 AND round2 < 98 AND round5 < 24 |
How about cities in Texas that have post codes starting with 4? | SELECT city FROM addresses WHERE zip_postcode LIKE "4%" and state_province_county = "Texas" |
List the first names of customers who have purchased products from sale person id 1. | SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesPersonID = 1 |
What are years of founding for orchestras that have had more than a single performance? | SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1 |
Where is the IHSAA Class of aaa school with more than 590 enrolled? | SELECT location FROM table_name_1 WHERE ihsaa_class = "aaa" AND enrollment > 590 |
What's the money ($) for the t3 place and the score of 74-74-71-69=288? | SELECT money___$__ FROM table_name_87 WHERE place = "t3" AND score = 74 - 74 - 71 - 69 = 288 |
Calculate the percentage of the nominees who were born in USA. | SELECT CAST(SUM(CASE WHEN T1.birth_country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Nominee'; |
What's the sum of Silver with total smaller than 560, a Bronze larger than 6, and a Gold of 3? | SELECT SUM(silver) FROM table_name_70 WHERE total < 560 AND bronze > 6 AND gold = 3 |
What is the Standings of Eintracht Braunschweig? | SELECT standings FROM table_name_28 WHERE champions = "eintracht braunschweig" |
What is the location of that university? | SELECT Location FROM campuses WHERE campus = "San Jose State University" |
On what tra k was the march 19 race held? | SELECT track FROM table_2454550_1 WHERE date = "March 19" |
what is the age of Matthew Ritter | select age from driver where name = "Matthew Ritter" |
how many projects are presented on the table | SELECT count ( * ) FROM projects |
What are the names of station with lowest lattitude? | SELECT name FROM station ORDER BY lat LIMIT 1 |
Who's the incumbent in the district first elected in 1976? | SELECT incumbent FROM table_1341604_19 WHERE first_elected = 1976 |
Name the lowest Col (m) with a Peak of pico basilé, and a Prominence (m) smaller than 3,011? | SELECT MIN(col__m_) FROM table_name_50 WHERE peak = "pico basilé" AND prominence__m_ < 3 OFFSET 011 |
What was the smallest crowd in games at the corio oval? | SELECT MIN(crowd) FROM table_name_13 WHERE venue = "corio oval" |
When 9386 is the undergraduate enrollment what is the nickname? | SELECT nickname FROM table_262495_1 WHERE undergraduate_enrollment = 9386 |
What is every song title for 2007? | SELECT song_title FROM table_21500850_1 WHERE year = 2007 |
What is the average age of the users who use model device of R7? | SELECT SUM(T1.age) / COUNT(T1.device_id) AS avg FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'R7' |
What were the max gust speed and cloud clover when the customer using bike no. 10 recorded the 386 seconds duration of the trip from MLK Library to San Salvador at 1st? | SELECT T2.max_gust_speed_mph, T2.cloud_cover FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T1.bike_id = 10 AND T2.mean_temperature_f > 62 AND T1.subscription_type = 'Customer' AND T1.start_station_name = 'MLK Library' AND T1.end_station_name = 'San Salvador at 1st' AND T1.duration = 386 |
Find the details of the shops that can be reached by walk. | SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" |
Which Event has the Opponent, Jason Yee? | SELECT event FROM table_name_3 WHERE opponent = "jason yee" |
List out the user who is an elite user for consecutively 5 years or more and what is the user average star? How many likes does this user gets? | SELECT T2.user_average_stars, COUNT(T3.likes) FROM Elite AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id INNER JOIN Tips AS T3 ON T3.user_id = T2.user_id GROUP BY T1.user_id HAVING COUNT(T1.user_id) > 5 |
What are the last names for those students? | SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y' |
What is the name and distance for the aircraft that has an id of 12? | SELECT name , distance FROM Aircraft WHERE aid = 12 |
What is the date of the away game when the team has a league position of 9th? | SELECT date FROM table_name_34 WHERE h___a = "a" AND league_position = "9th" |
How many locations for name of role as Xiao Gui 小鬼? | SELECT COUNT(location) FROM table_23379776_5 WHERE name_of_role = "Xiao Gui 小鬼" |
Who is the tallest gymnast? | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height desc limit 1 |
Which flight carrier operator flies from Atlantic City to Fort Lauderdale? | SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.ORIGIN = 'ACY' AND T1.DEST = 'FLL' GROUP BY T2.Description |
What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE? | SELECT T2.Dname , T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = "INTRODUCTION TO COMPUTER SCIENCE" |
What is main presenters of La Granja? | SELECT main_presenters FROM table_1053802_1 WHERE local_title = "La Granja" |
what are the maximum wins where the poles are 2? | SELECT MAX(wins) FROM table_2387790_1 WHERE poles = 2 |
How many Decembers have calgary flames as the opponent? | SELECT COUNT(december) FROM table_name_90 WHERE opponent = "calgary flames" |
Who had the high assists when the opponent was Indiana? | SELECT high_assists FROM table_27882867_9 WHERE team = "Indiana" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.