sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which Cup Apps (sub) had 2 goals? | SELECT cup_apps__sub_ FROM table_name_59 WHERE cup_goals = "2" |
What is the ICT when education is 1.73 and KI is ag 1.99? | SELECT ict FROM table_23050383_1 WHERE education = "1.73" AND ki = "1.99" |
Why did Geninho leave as manager? | SELECT manner_of_departure FROM table_29414946_3 WHERE outgoing_manager = "Geninho" |
What was John Jones's pick#? | SELECT SUM(pick) FROM table_name_30 WHERE player = "john jones" |
What's the original title of the film Zozo? | SELECT original_title FROM table_20061872_1 WHERE film_title_used_in_nomination = "Zozo" |
What is the visiting team of the game with the home team Grizzlies on 13 November 2007? | SELECT visitor FROM table_name_77 WHERE home = "grizzlies" AND date = "13 november 2007" |
When did the United States of America attained it's Independence? | SELECT T1.Independence FROM politics AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'United States' |
Give me the brewery and brand names of canned root beer that were purchased before 6/6/2015. | SELECT DISTINCT T2.BreweryName, T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T1.PurchaseDate < '2015-06-06' AND T1.ContainerType = 'Can' |
How many schools in Brooklyn with urban metro and donations for an honoree have requested TT992 - Refill Pack for Safety Name Tags as a resource? | SELECT COUNT(T2.schoolid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T2.school_city = 'Brooklyn' AND T2.school_metro = 'urban' AND T3.for_honoree = 't' AND T1.item_name = 'TT992 - Refill Pack for Safety Name Tags' |
When the winner was Alessandro Ballan, how many total team classifications were there? | SELECT COUNT(team_classification) FROM table_15294880_2 WHERE winner = "Alessandro Ballan" |
What was the winning team with the 8,132 final attendance? | SELECT winningteam FROM table_name_20 WHERE cup_final_attendance = "8,132" |
At what milepost is Beacon Falls? | SELECT milepost FROM table_2572788_1 WHERE town_city = "Beacon Falls" |
Hmm, I also want to know the phone numbers of all suppliers please. | SELECT supplier_phone FROM suppliers |
Show the delegate and committee information of elections. | SELECT Delegate , Committee FROM election |
which location in 2004? | do you mean campus? | which campus has the highest number of degrees? | SELECT T1.campus FROM Campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.Degrees = ( select max ( Degrees ) from degrees ) |
Name the termination of mission for appointed by of franklin pierce | SELECT termination_of_mission FROM table_name_76 WHERE appointed_by = "franklin pierce" |
What are the names of all the storms that affected at least 10 cities? | SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING sum ( T2.number_city_affected ) > = 10 |
How many perpetrators are there? | SELECT count(*) FROM perpetrator; |
For the event which happened at 23:55:16 on 2016/5/7, in the location coordinate(113, 28), on what device did it happen? Give the name of the device model. | SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T1.device_id = T2.event_id WHERE T2.longitude = '113' AND T2.latitude = '28' AND T2.timestamp = '2016-05-07 23:55:16' |
Name the most famous university in Argentina. | SELECT T1.university_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 T3.country_name = 'Argentina' GROUP BY T1.university_name ORDER BY SUM(T2.score) DESC LIMIT 1 |
What's that department's address? | SELECT T4.DEPT_ADDRESS FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY count ( * ) DESC LIMIT 1 |
What is the coordinate velocity v dx/dt in units of c total number if the velocity angle η in i-radians is ln[2 + √5] ≅ 1.444? | SELECT COUNT(coordinate_velocity_v_dx_dt_in_units_of_c) FROM table_15314901_1 WHERE velocity_angle_η_in_i_radians = "ln[2 + √5] ≅ 1.444" |
Show the distinct countries of managers. | SELECT DISTINCT Country FROM manager |
Who had the high rebounds when the team played Sacramento? | SELECT high_rebounds FROM table_17355408_9 WHERE team = "Sacramento" |
What's the speed rank in 1963? | SELECT speed_rank FROM table_name_11 WHERE year = "1963" |
What year was Caroline Medina Miss Fire (3rd Runner-up)? | SELECT AVG(year) FROM table_name_21 WHERE miss_fire__3rd_runner_up_ = "caroline medina" |
What Etymology ranked 12? | SELECT etymology FROM table_name_58 WHERE rank = 12 |
Name the sum of played with wins more than 19 | SELECT SUM(played) FROM table_name_14 WHERE wins > 19 |
Can you tell me the Position that has the CFL Team of toronto? | SELECT position FROM table_name_31 WHERE cfl_team = "toronto" |
What location did david mccann receive a siver and morgan fox win the gold? | SELECT location FROM table_name_38 WHERE silver = "david mccann" AND gold = "morgan fox" |
What shows for 2002 when 2006 is Grand Slam Tournaments? | SELECT 2002 FROM table_name_65 WHERE 2006 = "grand slam tournaments" |
How many transactions were made to purchase a bottle of beer using American Express? | SELECT COUNT(T1.RootBeerID) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID WHERE T1.ContainerType = 'Bottle' AND T2.CreditCardType = 'American Express' |
List all the dates of enrollment and completion of students. | SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment |
List at least 10 films that the customers can rent for more than 5 days. | SELECT T.title FROM ( SELECT T1.title, COUNT(T3.customer_id) AS num FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id WHERE T1.rental_duration > 5 GROUP BY T1.title ) AS T WHERE T.num > 10 |
Where was the combat of 2009-09-16? | SELECT location FROM table_name_80 WHERE circumstances = "combat" AND date = "2009-09-16" |
what is the year of Gone with the Wind | SELECT year FROM Movie WHERE title = 'Gone with the Wind' |
How many yards were averaged by the player that had a higher than 13 average with less than 18 long? | SELECT AVG(yards) FROM table_name_94 WHERE long < 18 AND avg > 13 |
What is the number Played that has 310 Points for? | SELECT played FROM table_name_77 WHERE points_for = "310" |
How many episodes in the series were directed by Alan Taylor? | SELECT COUNT(no_in_series) FROM table_2182654_3 WHERE directed_by = "Alan Taylor" |
Who is the oldest player that participated in OHL league in the 1997 - 2000 season? | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.LEAGUE = 'OHL' AND T2.SEASON = '1999-2000' ORDER BY T1.birthdate LIMIT 1 |
Calculate the total dish count for menu with uuid of "510d47e4-2958-a3d9-e040-e00a18064a99" & "510d47e4-295a-a3d9-e040-e00a18064a99". | SELECT SUM(CASE WHEN T2.uuid = '510d47e4-2958-a3d9-e040-e00a18064a99' THEN T1.dish_count ELSE 0 END) - SUM(CASE WHEN T2.uuid = '510d47e4-295a-a3d9-e040-e00a18064a99' THEN T1.dish_count ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id |
What is the total number of Tonnage, when Date is "25 June 1943"? | SELECT COUNT(tonnage) FROM table_name_4 WHERE date = "25 june 1943" |
Return the owner id, first name and last name of the owner who has the most dogs. | SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1 |
In which year did the user who gave the most number of "5" star reviews join the Yelp? | SELECT T2.user_yelping_since_year FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.review_stars = 5 GROUP BY T2.user_yelping_since_year ORDER BY COUNT(T1.review_stars) DESC LIMIT 1 |
Among the female users that uses OPPO as their phone brand, what is the percentage of them of the user that uses R815T model to install the app? | SELECT SUM(IIF(T1.phone_brand = 'OPPO', 1, 0)) / SUM(IIF(T1.device_id = 'R815T', 1, 0)) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.gender = 'F' |
can you show me a list of starting year? | SELECT Starting_year FROM player_coach |
what is the to par for $242,813 with score 68-72-74-66=280 | SELECT to_par FROM table_name_83 WHERE money___$__ = "242,813" AND score = 68 - 72 - 74 - 66 = 280 |
In 2015, what percentage of trips that had the subscription type was Customer and ended on a rainy day? | SELECT CAST(SUM(CASE WHEN T2.events = 'Rain' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE SUBSTR(CAST(T2.date AS TEXT), -4) = '2015' AND T1.subscription_type = 'Customer' |
what is the average of capacities? | SELECT avg ( Capacity ) FROM cinema |
When David McNamara was the opponent in the final, what was the tier? | SELECT tier FROM table_name_59 WHERE opponent_in_the_final = "david mcnamara" |
On the date of 30/01/1991, when the away team was Liverpool, what was the score? | SELECT score FROM table_name_76 WHERE date = "30/01/1991" AND away_team = "liverpool" |
What is the lowest total data processing and exploitation of 00 0,228, and a management and support larger than 1,7? | SELECT MIN(total) FROM table_name_72 WHERE data_processing_and_exploitation = "00 0,228" AND management_and_support > 1 OFFSET 7 |
In what year was player Bruce Graham acquired? | SELECT acquired FROM table_name_18 WHERE player = "bruce graham" |
How many ingredients are there in the recipe that is best in helping your body's natural defence against illness and infection? | SELECT COUNT(*) FROM Nutrition AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.vitamin_a > 0 |
Is Zach also a male? | SELECT gender from person where name = "Zach" |
Show names for artists without any exhibition. | SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition) |
Of all male officers, what percentage are black officers? | SELECT CAST(SUM(race = 'B') AS REAL) * 100 / COUNT(case_number) FROM officers WHERE gender = 'M' |
Who wrote the episode with a production code of ip03007? | SELECT written_by FROM table_29273182_1 WHERE production_code = "IP03007" |
Give the full name of employee who handled the order id 10280. | SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10280 |
What year at CU is the person in video services with an experience less than 1? | SELECT year_at_cu FROM table_name_8 WHERE experience < 1 AND position = "video services" |
What date did De Vries start? | SELECT started FROM table_12608427_8 WHERE name = "de Vries" |
In which district was the incumbent Dick Saslaw? | SELECT district FROM table_13618584_1 WHERE incumbent = "Dick Saslaw" |
How few laps were finished in 17? | SELECT MIN(laps) FROM table_name_48 WHERE finish = "17" |
List the total scores of body builders in ascending order. | SELECT Total FROM body_builder ORDER BY Total ASC |
Among the films starred by Nick Wahlberg, what is the percentage of the films with G rating? | SELECT CAST(SUM(IIF(T3.rating = 'G', 1, 0)) AS REAL) / COUNT(T3.film_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 T1.first_name = 'Elvis' AND T1.last_name = 'Marx' |
Provide the full names of employees earning more than the employee with id 163. | SELECT first_name , last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163 ) |
Which state has the most cities? | SELECT state_abbrev FROM district GROUP BY state_abbrev ORDER BY COUNT(city) DESC LIMIT 1 |
What is the week number with Phil Collins as the original artist? | SELECT week__number FROM table_name_88 WHERE original_artist = "phil collins" |
Which Race has a Runners of 7 and Odds of 1/3? | SELECT race FROM table_name_30 WHERE runners = 7 AND odds = "1/3" |
name the student ids who attend the statastic course?in order of attendance date | SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.date_of_attendance |
Which nation has the number of silver medals greater than 1, and bronze medals as 1? | SELECT nation FROM table_name_7 WHERE silver > 1 AND bronze = 1 |
How many times is the shot volume (cm3) less than 172.76? | SELECT COUNT(shot_diameter__cm_) FROM table_name_37 WHERE shot_volume__cm_3__ < 172.76 |
Who did Abdelhafid Benchebla face in the quarterfinals? | SELECT quarterfinals FROM table_17427004_7 WHERE athlete = "Abdelhafid Benchebla" |
Which author of the paper "Incremental Extraction of Keyterms for Classifying Multilingual Documents in the Web" is affiliated with National Taiwan University Department of Computer Science and Information Engineering Taiwan? | SELECT T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'Incremental Extraction of Keyterms for Classifying Multilingual Documents in the Web' AND T1.Affiliation = 'National Taiwan University Department of Computer Science and Information Engineering Taiwan' |
Who were the students who failed the course "Applied Deep Learning"? Give the full name. | SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Applied Deep Learning ' AND T2.grade IS NULL |
Write down the times when there is no available bike to borrow in a station. List down the stations name and location coordinate. | SELECT T2.time, T1.name, T1.lat, T1.long FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.bikes_available = 0 |
Please list the Alpha2Codes of all the countries that have an indicator on Rural population in 1960. | SELECT T1.Alpha2Code FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Rural population' AND T2.Year = 1960 |
Show the times used by climbers to climb mountains in Country Uganda. | SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda" |
What is the rank for the nation with 0 silver medals and a total larger than 2? | SELECT SUM(rank) FROM table_name_86 WHERE silver = 0 AND total > 2 |
Who directed the episode with production code ip01003? | SELECT directed_by FROM table_29273057_1 WHERE production_code = "IP01003" |
how mnay greek designation in tampa | SELECT COUNT(greek_designation) FROM table_18159601_1 WHERE city = "Tampa" |
what are the air dates for episodes with the production code 08-02-214 | SELECT original_air_date FROM table_16390576_3 WHERE production_code = "08-02-214" |
Show the ids for all the students who participate in an activity and are under 20. | SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20 |
What car number has 130 points? | SELECT car__number FROM table_name_58 WHERE points = 130 |
Which carrier is ranked 20? | SELECT carriers FROM table_name_19 WHERE rank = 20 |
How many products have a price higher than the average? | SELECT count ( * ) FROM products WHERE product_price > ( SELECT avg ( product_price ) FROM products ) |
From what Country is T6 Place Player Robert Karlsson? | SELECT country FROM table_name_19 WHERE place = "t6" AND player = "robert karlsson" |
What is the average and total transaction amount? | SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions |
What year was the Win percentage 60%? | SELECT years FROM table_name_77 WHERE win_percentage = "60%" |
What are each of those pilots' nationalities? | Do you want to konw Pilot name and related pilots' nationalities? | Yes, please. | SELECT Pilot_name,Nationality from pilot |
What are their login names? | SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "operating system" OR T2.course_name = "data structure" |
Who wrote the episode that originally aired on January 15, 1993? | SELECT written_by FROM table_2409041_5 WHERE original_air_date = "January 15, 1993" |
What is the birth date of A. J. Holmes who has a right-handed batting style? | SELECT birth_date FROM table_name_57 WHERE batting_style = "right-handed" AND name = "a. j. holmes" |
What are the names of players whose training hours is between 500 and 1500? | SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500 |
Find the titles of all the papers written by "Jeremy Gibbons" | 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 WHERE t1.fname = "Jeremy" AND t1.lname = "Gibbons" |
What was the year Elected of Republican Incumbent Dave Reichert? | SELECT elected FROM table_name_31 WHERE party = "republican" AND incumbent = "dave reichert" |
What shows for 2000 when 2013 shows 3rd? | SELECT 2000 FROM table_name_19 WHERE 2013 = "3rd" |
Which major town is located within the Outback Areas Community Development Trust? | SELECT major_town FROM table_23685890_2 WHERE local_government_area = "Outback Areas Community Development Trust" |
what is the time/retired when the grid is 9? | SELECT time_retired FROM table_name_77 WHERE grid = 9 |
Find the city that hosted the most events. | SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.