sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the name of the authors of papers in which conferences have been published whose full name includes the word Workshop? | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T3.FullName LIKE '%Workshop%' |
What is the athlete from Edwardsville? | SELECT athlete FROM table_1231316_7 WHERE location = "Edwardsville" |
Who is the instructor with the highest salary? | SELECT name FROM instructor ORDER BY salary DESC LIMIT 1 |
Please list the vendor providing resources for the projects of a school with the highest poverty level. | SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.poverty_level = 'highest poverty' |
What is the full name of the team that has the most players from UCLA? | SELECT T3.name FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T3.tmID = T2.tmID WHERE T1.college = 'UCLA' GROUP BY T3.name ORDER BY COUNT(DISTINCT T1.playerID) DESC LIMIT 1 |
What is Winner, when Year is 2013? | SELECT winner FROM table_name_11 WHERE year = 2013 |
How many airports are in Papua New Guinea country? | SELECT count ( * ) from airports where country = 'Papua New Guinea' |
Who is the alderman in the ward associated with the crime with report number 23769? | SELECT T2.alderman_first_name, T2.alderman_last_name FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.report_no = 23769 |
what is the nfl team where player is thane gash | SELECT nfl_team FROM table_10650711_1 WHERE player = "Thane Gash" |
When Estudiantes was team #2, what was their agg. value? | SELECT agg FROM table_name_28 WHERE team__number2 = "estudiantes" |
What was the earliest year that a structure was located in gray court, south carolina? | SELECT MIN(year) FROM table_name_63 WHERE town = "gray court, south carolina" |
What was the home team that played Vancouver on April 29? | SELECT home FROM table_name_62 WHERE visitor = "vancouver" AND date = "april 29" |
What is the amount of money with a score of 67-71-70-71=279? | SELECT COUNT(money___) AS $__ FROM table_name_85 WHERE score = 67 - 71 - 70 - 71 = 279 |
How many positions have figueirense as the team, with a played greater than 38? | SELECT COUNT(position) FROM table_name_39 WHERE team = "figueirense" AND played > 38 |
Name the frequency for 103.7 energy fm dipolog* | SELECT frequency FROM table_27914076_1 WHERE branding = "103.7 Energy FM Dipolog*" |
What is the viewers where the rating is 5.3? | SELECT viewers__m_ FROM table_11178271_1 WHERE rating = "5.3" |
List the countries more than two swimmer? | SELECT nationality FROM swimmer GROUP BY nationality HAVING count ( * ) > 2 |
What is the highest grade point? | SELECT max ( gradepoint ) FROM GRADECONVERSION |
Name the country for airline of gol | SELECT country FROM table_name_33 WHERE airline = "gol" |
Who is the Winning Applicant of Block 10B in Derbyshire Area? | SELECT winning_applicant FROM table_name_39 WHERE block = "10b" AND area = "derbyshire" |
Find name of all students? | Do you mean First or Last name of the students? | Find the average student GPA? | SELECT avg ( STU_GPA ) FROM STUDENT |
What is the title of the song with a track less than 8 released on 3/22/57? | SELECT song_title FROM table_name_53 WHERE track < 8 AND release_date = "3/22/57" |
What venue had a draw? | SELECT venue FROM table_name_77 WHERE result = "draw" |
What other details can you tell me about students in reverse alphabetical order? | SELECT other_student_details FROM Students ORDER BY other_student_details DESC |
How many votes were tallied in 1956 with a % of national vote larger than 11.47? | SELECT SUM(votes) FROM table_name_66 WHERE date = "1956" AND _percentage_of_national_vote > 11.47 |
What is the attendance in week 4? | SELECT AVG(attendance) FROM table_name_57 WHERE week = 4 |
What is the id of the project with least number of documents? | SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1 |
What are the names of those cities? | SELECT city FROM city WHERE regional_population < 5000000 |
Name the average attendance from june 11 | SELECT AVG(attendance) FROM table_name_50 WHERE date = "june 11" |
What are the different types of forms? | SELECT DISTINCT form_type_code FROM forms |
What is the name of the most common genre in all tracks? | SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1 |
Which region has 0.6% none? | SELECT region FROM table_25042332_26 WHERE none = "0.6%" |
What is the official language used in the country the name of whose head of state is Beatrix. | SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = "Beatrix" AND T2.IsOfficial = "T" |
What are the country codes for countries that do not speak English? | SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" |
What's the Result listed that has a Date of June 12, 1997? | SELECT result FROM table_name_76 WHERE date = "june 12, 1997" |
What is Qual 2, when Best is 1:27.642? | SELECT qual_2 FROM table_name_27 WHERE best = "1:27.642" |
How many free throws did Charles Pearman score? | SELECT MAX(free_throws) FROM table_28693349_2 WHERE player = "Charles Pearman" |
What are the birth places that are shared by at least two people? | SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT ( * ) > = 2 |
Show me the names of the clubs that do not have any players? | SELECT name FROM CLub WHERE Club_ID NOT IN ( SELECT Club_ID FROM player ) |
What is the full name and id of the customer who has the lowest total amount of payment? | SELECT T1.first_name , T1.last_name , T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1 |
List the first name, last name and team name of players who are drafted from 'Seattle' between year 1965 to 1970. | SELECT DISTINCT T1.firstName, T1.lastName, T3.name FROM players AS T1 INNER JOIN draft AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T2.tmID = T3.tmID WHERE T2.draftFrom = 'Seattle' AND T2.draftYear BETWEEN 1965 AND 1970 |
What is the average rental payment in Horror movies? | SELECT AVG(T5.amount) FROM category AS T1 INNER JOIN film_category AS T2 ON T1.category_id = T2.category_id INNER JOIN inventory AS T3 ON T2.film_id = T3.film_id INNER JOIN rental AS T4 ON T3.inventory_id = T4.inventory_id INNER JOIN payment AS T5 ON T4.rental_id = T5.rental_id WHERE T1.name = 'Horror' |
What was the location for a year later than 2012? | SELECT location FROM table_name_82 WHERE year > 2012 |
What is the average duration in milliseconds of tracks that belong to Latin or Pop genre? | SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Latin" OR T1.Name = "Pop" |
What are the names of airports in Aberdeen? | SELECT AirportName FROM AIRPORTS WHERE City = "Aberdeen" |
What is the average duration of songs that have mp3 format and resolution below 800? | SELECT avg ( T1.duration ) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" AND T2.resolution < 800 |
Find the student ID and login name of the student with the most course enrollments | SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1 |
What are the details of the markets that can be accessed by walk or bus? | SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" OR T2.How_to_Get_There = "bus" |
find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. | SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1 |
What is the average hexadecimal with a decimal greater than 57? | SELECT AVG(hexadecimal) FROM table_name_2 WHERE decimal > 57 |
Which Assist/pass has a Result of 6-2? | SELECT assist_pass FROM table_name_73 WHERE result = "6-2" |
List the name and country of origin for all singers who have produced songs with rating above 9. | SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9 |
How much Loss has an Avg/G larger than 129.2? | SELECT COUNT(loss) FROM table_name_87 WHERE avg_g > 129.2 |
Which episode had celebrities Nick Hewer and Saira Khan in them? | SELECT episode FROM table_24725951_1 WHERE celebrities = "Nick Hewer and Saira Khan" |
Who ordered the order ID CA-2011-118976 from the East region? | SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Order ID` = 'CA-2011-118976' AND T2.Region = 'East' |
What is the highest goals against when points are larger than 31, the goal difference is smaller than 9, wins are 13, and draws are larger than 6? | SELECT MAX(goals_against) FROM table_name_12 WHERE points > 31 AND goal_difference < 9 AND wins = 13 AND draws > 6 |
What is the time for qual 2 that has the best time of 59.266? | SELECT qual_2 FROM table_name_45 WHERE best = "59.266" |
What's the duration of the Archers with Pauline Seville acting? | SELECT duration FROM table_name_45 WHERE soap_opera = "the archers" AND actor = "pauline seville" |
Show the unique first names, last names, and phone numbers for all customers with any account. | SELECT DISTINCT T1.customer_first_name , T1.customer_last_name , T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id |
What type of cartridge is used by a Weatherby? | SELECT cartridge FROM table_16010376_1 WHERE source = "Weatherby" |
How many products with a thumpnail photo? | SELECT COUNT(ProductID) FROM ProductProductPhoto WHERE ProductPhotoID != 1 |
Who was the incumbent when the candidates were John banks (am) 52.2% samuel power (j) 47.8%? | SELECT incumbent FROM table_2668199_2 WHERE candidates = "John Banks (AM) 52.2% Samuel Power (J) 47.8%" |
How many blocks are there when the rebounds are fewer than 5.2? | SELECT COUNT(blocks) FROM table_name_19 WHERE rebounds < 5.2 |
Indicate the name of the country with a population greater than 10000 in 2010. | SELECT DISTINCT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.population_2010 > 10000 |
What is the total number of students enrolled in schools without any goalies? | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie") |
How many Tries has Points for smaller than 137, and Tries against larger than 12? | SELECT COUNT(tries_for) FROM table_name_81 WHERE points_for < 137 AND tries_against > 12 |
Name the G. Hager of E. Greenberg of 266 (14%)? | SELECT g_hager FROM table_name_49 WHERE e_greenberg = "266 (14%)" |
Name the number of dismissals for adam gilchrist | SELECT COUNT(dismissals) FROM table_23316034_23 WHERE player = "Adam Gilchrist" |
What position has ronjay buenafe as the name? | SELECT position FROM table_name_16 WHERE name = "ronjay buenafe" |
what team lost the most points | SELECT lost FROM table_name_56 WHERE "points" = "points" |
Name the least f/laps | SELECT MIN(f_laps) FROM table_25375093_1 |
Calculate the percentage of the weight of goods being transported by Zachery Hicks to California in year 2016. | SELECT CAST(SUM(CASE WHEN T2.first_name = 'Zachery' AND T2.last_name = 'Hicks' THEN T1.weight ELSE 0 END) AS REAL) * 100 / SUM(T1.weight) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2016' |
Which DOB has Throws of r, and a Position of c, and a First of torey? | SELECT dob FROM table_name_25 WHERE throws = "r" AND position = "c" AND first = "torey" |
Which class has fewer than 89 points and the Honda team later than 1987? | SELECT class FROM table_name_48 WHERE points < 89 AND team = "honda" AND year > 1987 |
What is the time with 10 grids? | SELECT time_retired FROM table_name_81 WHERE grid = 10 |
How many users answered "Yes" to the question "Have you had a mental health disorder in the past?" in 3 consecutive years starting from 2016? | SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID IN (2016, 2017, 2018) AND T1.questiontext LIKE 'Have you had a mental health disorder in the past?' AND T2.AnswerText = 'Yes' |
What are their names? | SELECT name FROM cinema WHERE capacity > = 300 |
What are their sponsor names? | SELECT T3.Sponsor_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID |
How many movie lists with over 100 movies had user 85981819 created when he or she was a paying subscriber? | SELECT COUNT(*) FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 85981819 AND T1.list_movie_number > 100 AND T2.user_has_payment_method = 1 |
What are the student IDs for everybody who worked for more than 10 hours per week on all sports? | SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10 |
How many times did Super Nova Racing win with a zytek engine? | SELECT wins FROM table_name_14 WHERE engine = "zytek" AND racing_team = "super nova racing" |
What is the End Source from the Hartlepool United Loan Club? | SELECT end_source FROM table_name_51 WHERE loan_club = "hartlepool united" |
Which Series are on may 18? | SELECT series FROM table_name_86 WHERE date = "may 18" |
Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25. | SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25" |
How many production companies does the movie "Four Rooms" have? | SELECT COUNT(CNAME) FROM ( SELECT T1.company_name AS CNAME FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T3.title = 'Four Rooms' ) |
how many county with per capita income being $20,101 | SELECT COUNT(county) FROM table_1350350_2 WHERE per_capita_income = "$20,101" |
Give the name of venue for the game with a win margin of 138 points. | SELECT T2.Venue_Name FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE T1.Win_Margin = 138 |
At which venue did the event held on 15 November 2010 occur? | SELECT venue FROM table_name_78 WHERE date = "15 november 2010" |
What was the total effic for the quarterbacks? | SELECT MIN(effic) FROM table_name_20 WHERE name = "total" |
How many figures are there for No votes for the Forest Rehabilitation Debt Limit Amendment? | SELECT COUNT(no_votes) FROM table_256286_45 WHERE description = "Forest Rehabilitation Debt Limit Amendment" |
If the year is 2001, what are the non qatari female? | SELECT Non AS qatari_female FROM table_26214389_3 WHERE year = 2001 |
What series number is the episode with production code bdf101? | SELECT MAX(series__number) FROM table_28019988_2 WHERE production_code = "BDF101" |
Which Interactivity support has a Format of fictionbook? | SELECT interactivity_support FROM table_name_75 WHERE format = "fictionbook" |
What is the email and partition id of Tyler Swift? | SELECT email,partitionid FROM user_profiles where name = "Tyler Swift" |
What is the 2003 seat number, when seats contested was at 38.23% | SELECT MIN(2003 AS _seats) FROM table_20728138_1 WHERE _percentage_in_seats_contested = "38.23%" |
What is the location with the most cinemas opened in year 2010 or later? | SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1 |
How many people are in New York City? | SELECT count ( * ) from person where city = "new york city" |
how many capital with population census 2009 being 284657 | SELECT COUNT(capital) FROM table_1404456_1 WHERE population_census_2009 = 284657 |
When racing engineering is the team and 2012 is the team what is the position? | SELECT position FROM table_25352318_1 WHERE season = 2012 AND team = "Racing Engineering" |
List the first and last name of all unmarried male Production Supervisors. | SELECT T2.FirstName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.MaritalStatus = 'S' AND T1.Gender = 'M' AND T1.JobTitle LIKE 'Production Supervisor%' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.