interaction_utterance
sequencelengths 0
6
| interaction_query
sequencelengths 0
6
| final_utterance
stringlengths 19
224
| final_query
stringlengths 22
577
| db_id
stringclasses 140
values |
---|---|---|---|---|
[
"List the lessons taken by each customer first and last name.",
"Just show that information for the completed status lessons.",
"How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?"
] | [
"SELECT T2.first_name, T2.last_name, count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP by T2.customer_id",
"SELECT T2.first_name, T2.last_name, count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP by T2.customer_id where t1.lesson_status_code = 'Completed'",
"SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\" AND T1.lesson_status_code = \"Completed\";"
] | How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed? | SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin" AND T1.lesson_status_code = "Completed"; | driving_school |
[
"List names of customers with their amount outstanding.",
"What is maximum, minimum and average amount of outstanding of customer?"
] | [
"SELECT first_name, last_name, amount_outstanding from customers",
"SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers;"
] | What is maximum, minimum and average amount of outstanding of customer? | SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers; | driving_school |
[
"List records of customers living in city Lockmanfurt.",
"Just show the first and last name."
] | [
"SELECT * FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";",
"SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";"
] | List first name and last name of customers living in city Lockmanfurt. | SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt"; | driving_school |
[
"Join customer names with their lived-in countries.",
"Which country does customer with first name as Carole and last name as Bernhard live in?"
] | [
"SELECT T1.first_name, T1.last_name, T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id",
"SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\""
] | Which country does customer with first name as Carole and last name as Bernhard live in? | SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" | driving_school |
[
"What are the customers zip codes?",
"What is zip code of customer with first name as Carole and last name as Bernhard?"
] | [
"SELECT T1.first_name, T1.last_name, T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id",
"SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\""
] | What is zip code of customer with first name as Carole and last name as Bernhard? | SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" | driving_school |
[
"Give counts of cities customers live in.",
"Which city has most number of customers?"
] | [
"SELECT T2.city, count(*) FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city",
"SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;"
] | Which city has most number of customers? | SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1; | driving_school |
[
"List a sum of all the payments for all the customers.",
"How much in total has customer with first name as Carole and last name as Bernhard paid?"
] | [
"SELECT T2.first_name, T2.last_name, sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP by T2.customer_id",
"SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Carole\" AND T2.last_name = \"Bernhard\""
] | How much in total has customer with first name as Carole and last name as Bernhard paid? | SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard" | driving_school |
[
"Which customer ids have no payment history?",
"Count those."
] | [
"SELECT customer_id from customers EXCEPT SELECT customer_id from Customer_Payments",
"SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );"
] | List the number of customers that did not have any payment history. | SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments ); | driving_school |
[
"Count the payments per customer.",
"Just for those with more than 2 payments."
] | [
"SELECT T2.first_name, T2.last_name, count(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP by T2.customer_id",
"SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2;"
] | List first name and last name of customers that have more than 2 payments. | SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2; | driving_school |
[
"List lesson id of all lessons taught by staff with first name as Janessa",
"Intersect that with last name Sawayn and nickname containing letter 's'."
] | [
"SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\"",
"SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\" AND nickname LIKE \"%s%\";"
] | List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'. | SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" AND nickname LIKE "%s%"; | driving_school |
[
"Count the lessons grouped by staff first name.",
"How many lessons taught by staff whose first name has letter 'a' in it?"
] | [
"SELECT T2.first_name, count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id GROUP by T2.first_name",
"SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE \"%a%\""
] | How many lessons taught by staff whose first name has letter 'a' in it? | SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%" | driving_school |
[
"Count the lesson time grouped by staff id.",
"Join that sum on the staff with first name Janess and last name Sawayn."
] | [
"SELECT T2.staff_id, sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id GROUP by T2.staff_id",
"SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";"
] | How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn? | SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | driving_school |
[
"Show the sum of lesson prices per staff.",
"Give the average.",
"Just for first name as Janessa and last name as Sawayn?"
] | [
"SELECT T2.first_name, T2.last_name, sum(T1.price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id GROUP by T2.staff_id",
"SELECT T2.first_name, T2.last_name, avg(T1.price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id GROUP by T2.staff_id",
"SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";"
] | What is average lesson price taught by staff with first name as Janessa and last name as Sawayn? | SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; | driving_school |
[
"count the lessons taken per customer first name.",
"How many lessons did customer with first name Ray take?"
] | [
"SELECT T2.first_name, count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP by T2.first_name",
"SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Ray\""
] | How many lessons did customer with first name Ray take? | SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Ray" | driving_school |
[
"What are the distinct last names of staff?",
"Of customers?",
"Intersect that."
] | [
"SELECT DISTINCT last_name FROM Staff",
"SELECT DISTINCT last_name FROM Customers",
"SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff"
] | Which last names are both used by customers and by staff? | SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff | driving_school |
[
"Which staff gave lessons? Give their first names.",
"Which staff first names did not?"
] | [
"SELECT DISTINCT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id",
"SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id"
] | What are the first names of staff who did not give any lesson? | SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id | driving_school |
[
"What are the names of all the members?",
"What countries are they each from?",
"Now show those from the United States.",
"Can you also include those from Canada?"
] | [
"SELECT Name FROM member",
"SELECT Name, Country FROM member",
"SELECT Name, Country FROM member WHERE Country = \"United States\"",
"SELECT Name FROM member WHERE Country = \"United States\" OR Country = \"Canada\""
] | Show the names of members whose country is "United States" or "Canada". | SELECT Name FROM member WHERE Country = "United States" OR Country = "Canada" | decoration_competition |
[
"What are all the distinct countries the members belong to?",
"How many members belong to each one?",
"Which one has the least number of members?",
"How about the most?"
] | [
"SELECT distinct Country FROM member",
"SELECT Country, count(*) FROM member GROUP BY Country",
"SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) ASC LIMIT 1",
"SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the most common country across members. | SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1 | decoration_competition |
[
"Can you show me all the member names and their countries?",
"List all the different countries.",
"Which of these have more than one member?",
"How about more than two?"
] | [
"SELECT Name, Country FROM member",
"SELECT distinct Country FROM member",
"SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 1",
"SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2"
] | Which countries have more than two members? | SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2 | decoration_competition |
[
"What are the names of all the members in alphabetical order?",
"Also provide their college names.",
"and their college locations!",
"actually, show just the names and locations."
] | [
"SELECT Name FROM member ORDER BY Name ASC",
"SELECT T2.Name , T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC",
"SELECT T2.Name , T1.Name, T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC",
"SELECT T2.Name , T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC"
] | Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names. | SELECT T2.Name , T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC | decoration_competition |
[
"Who are all the members from the country Canada?",
"What are the names of the colleges they go to?",
"Who are the team leaders of these colleges?",
"Show me a list of all the different leaders!"
] | [
"SELECT Member_ID FROM member WHERE Country = \"Canada\"",
"SELECT T2.Member_ID, T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = \"Canada\"",
"SELECT T2.Member_ID, T1.Name, T1.leader_name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = \"Canada\"",
"SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = \"Canada\""
] | Show the distinct leader names of colleges associated with members from country "Canada". | SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = "Canada" | decoration_competition |
[
"How many different rounds are there?",
"What are they?",
"For each, who are the names of the members with ranks in rounds lower than 3?",
"How about greater than 3?"
] | [
"SELECT count(DISTINCT round_id) FROM round",
"SELECT DISTINCT round_id FROM round",
"SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round < 3",
"SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3"
] | Show the names of members that have a rank in round higher than 3. | SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3 | decoration_competition |
[
"What are the names of the member that did not made it to any round?",
"Now show me the other members!",
"Show just the names ordered from greatest to least on their ranks.",
"Actually, sort least to greatest!"
] | [
"SELECT Name FROM member where Name NOT IN (SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round)",
"SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID",
"SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round DESC",
"SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC"
] | Show the names of members in ascending order of their rank in rounds. | SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC | decoration_competition |
[
"List the information for all volumes.",
"Order them by weeks on top from the most to the least.",
"What is the maximum weeks on top for a volume?",
"Include the minimum as well."
] | [
"SELECT * FROM volume",
"SELECT * FROM volume ORDER BY weeks_on_top DESC",
"SELECT max(Weeks_on_Top) FROM volume",
"SELECT max(Weeks_on_Top) , min(Weeks_on_Top) FROM volume"
] | What are the maximum and minimum week on top of all volumes? | SELECT max(Weeks_on_Top) , min(Weeks_on_Top) FROM volume | music_4 |
[
"Order volumes by weeks on top in increasing order.",
"Which volumes lasted no more than 2 weeks on top?",
"Which ones lasted more than 2 weeks on top?",
"What are the ceremony dates for these volumes?"
] | [
"SELECT * FROM volume ORDER BY weeks_on_top",
"SELECT volume_ID FROM volume WHERE weeks_on_top <= 2",
"SELECT volume_ID FROM volume WHERE weeks_on_top > 2",
"SELECT DISTINCT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2"
] | Please show the date of ceremony of the volumes that last more than 2 weeks on top. | SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2 | music_4 |
[
"List the names of all songs.",
"Which songs were featured at music festivals?",
"Which ones have the result “nominated”?"
] | [
"SELECT song FROM volume",
"SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID",
"SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\""
] | Please show the songs that have result "nominated" at music festivals. | SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated" | music_4 |
[
"List the names of artists who have released volumes.",
"List the information of volumes released by Gorgoroth.",
"What are their issue dates?"
] | [
"SELECT DISTINCT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID",
"SELECT * FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = \"Gorgoroth\"",
"SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = \"Gorgoroth\""
] | What are the issue dates of volumes associated with the artist "Gorgoroth"? | SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = "Gorgoroth" | music_4 |
[
"List all artists.",
"Only list those aged 32 or older.",
"Show the information for volumes associated with these artists.",
"Only show song names."
] | [
"SELECT DISTINCT artist FROM Artist",
"SELECT DISTINCT artist FROM Artist WHERE age >= 32",
"SELECT * FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32",
"SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32"
] | What are the songs in volumes associated with the artist aged 32 or older? | SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32 | music_4 |
[
"List all volumes.",
"Only show information for volumes associated with artists aged 25 or younger.",
"What is the average weeks on top for these volumes?"
] | [
"SELECT * FROM volume",
"SELECT * FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25",
"SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25"
] | What is the average weeks on top of volumes associated with the artist aged 25 or younger? | SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25 | music_4 |
[
"What are the names of all artists?",
"Which of them have released volumes?",
"Only show those whose volumes spent more than 2 weeks on top.",
"List the famous titles of these artists."
] | [
"SELECT DISTINCT artist FROM Artist",
"SELECT DISTINCT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID",
"SELECT DISTINCT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2",
"SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2"
] | What are the famous title of the artists associated with volumes with more than 2 weeks on top? | SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 | music_4 |
[
"Show the names of all artists.",
"Order them by decreasing age.",
"Who is the oldest artist?",
"What is his famous release date?"
] | [
"SELECT DISTINCT artist FROM Artist",
"SELECT DISTINCT artist FROM Artist ORDER BY Age DESC",
"SELECT DISTINCT artist FROM Artist ORDER BY Age DESC LIMIT 1",
"SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1"
] | What is the famous release date of the artist with the oldest age? | SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1 | music_4 |
[
"List the names of all music festivals.",
"Include the ID of the volume featured at each music festival.",
"Also include the result of each volume.",
"What was the most common result?"
] | [
"SELECT music_festival FROM music_festival",
"SELECT music_festival, volume FROM music_festival",
"SELECT music_festival, volume, result FROM music_festival",
"SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1"
] | What is the most common result of the music festival? | SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 | music_4 |
[
"List all the different categories of music festivals.",
"Order them by decreasing frequency of category.",
"Only show the categories that appear more than once."
] | [
"SELECT DISTINCT Category FROM music_festival",
"SELECT Category FROM music_festival GROUP BY Category ORDER BY count(*) DESC",
"SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1"
] | Please show the categories of the music festivals with count more than 1. | SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1 | music_4 |
[
"List the song associated with each volume.",
"Show the weeks on top for each song.",
"Order by decreasing weeks on top.",
"Which song had the most weeks on top?"
] | [
"SELECT Song FROM volume",
"SELECT Song, weeks_on_top FROM volume",
"SELECT Song, weeks_on_top FROM volume ORDER BY weeks_on_top DESC",
"SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1"
] | What is the song in the volume with the maximum weeks on top? | SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1 | music_4 |
[
"List the names of all artists.",
"How many artists have not released any volumes?",
"What are their names?",
"How about their famous titles?"
] | [
"SELECT DISTINCT artist FROM artist",
"SELECT count(*) FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)",
"SELECT artist FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)",
"SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)"
] | Find the famous titles of artists that do not have any volume. | SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume) | music_4 |
[
"Which artists have released volumes?",
"Whose volumes lasted more than 2 weeks on top?",
"Whose volumes also lasted less than 2 weeks on top?",
"What are their famous titles?"
] | [
"SELECT DISTINCT artist FROM artist WHERE Artist_ID IN(SELECT Artist_ID FROM volume)",
"SELECT DISTINCT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2",
"SELECT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.artist FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2",
"SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2"
] | Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top. | SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2 | music_4 |
[
"List the information of all music festivals.",
"Only show festivals with category “Best Song”.",
"Which of those festivals also have the result “Awarded”?",
"Show their ceremony dates."
] | [
"SELECT * FROM music_festival",
"SELECT * FROM music_festival WHERE Category = \"Best Song\"",
"SELECT * FROM music_festival WHERE Category = \"Best Song\" AND RESULT = \"Awarded\"",
"SELECT Date_of_ceremony FROM music_festival WHERE Category = \"Best Song\" AND RESULT = \"Awarded\""
] | What are the date of ceremony of music festivals with category "Best Song" and result "Awarded"? | SELECT Date_of_ceremony FROM music_festival WHERE Category = "Best Song" AND RESULT = "Awarded" | music_4 |
[
"List the information for all volumes.",
"Order by increasing weeks on top.",
"Which one had the minimum weeks on top?",
"What was its issue date?"
] | [
"SELECT * FROM volume",
"SELECT * FROM volume ORDER BY Weeks_on_Top ASC",
"SELECT volume_ID FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1",
"SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1"
] | What is the issue date of the volume with the minimum weeks on top? | SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1 | music_4 |
[
"Show the results of all music festivals.",
"What is the total number of each result?",
"Order by decreasing order."
] | [
"SELECT RESULT FROM music_festival",
"SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT",
"SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC"
] | Please show the results of music festivals and the number of music festivals that have had each, ordered by this count. | SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC | music_4 |
[
"How many baseball players are there?",
"How about the number of colleges?",
"How many baseball players are there in each college?",
"Can you order the results by the number of baseball players in descending order?",
"Please give me the full name and id of the first college."
] | [
"SELECT COUNT(*) FROM player_college",
"SELECT COUNT(*) FROM college",
"SELECT T1.name_full, COUNT(*) FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id;",
"SELECT T1.name_full, COUNT(*) FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC",
"SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;"
] | what is the full name and id of the college with the largest number of baseball players? | SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1; | baseball_1 |
[
"What is the average salary of the players?",
"How about for each team?",
"How about for the team 'Boston Red Stockings' ?"
] | [
"SELECT avg(salary) FROM salary",
"SELECT T2.team_id_br, avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br GROUP BY T2.team_id_br",
"SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'"
] | What is average salary of the players in the team named 'Boston Red Stockings' ? | SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' | baseball_1 |
[
"How many players have participated in all star games?",
"How about in 1998?",
"Please list the first and last names of these players."
] | [
"SELECT COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id",
"SELECT COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998",
"SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998"
] | What are first and last names of players participating in all star game in 1998? | SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998 | baseball_1 |
[
"How many players have participated in all star games?",
"Among these players, how many times did they participate in all star game?",
"Could you please give the top 10 players that have the most all star experience?",
"Please give me the information of the top one."
] | [
"SELECT COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id",
"SELECT T1.name_first , T1.name_last , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id",
"SELECT T1.name_first , T1.name_last , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 10",
"SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1"
] | What are the first name, last name and id of the player with the most all star game experiences? Also list the count. | SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1; | baseball_1 |
[
"What is the average attendance?",
"What is the average attendance of each team in 2013?",
"How about in 2014?",
"Please list the id and rank of the team that had the largest average attendance in that year."
] | [
"SELECT AVG(attendance) FROM home_game",
"SELECT T2.team_id , avg(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2013 GROUP BY T1.team_id",
"SELECT T2.team_id , avg(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id",
"SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;"
] | In 2014, what are the id and rank of the team that has the largest average number of attendance? | SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1; | baseball_1 |
[
"Who are the managers that have won the manager award?",
"How many times did each manager get this award?",
"Who won the most times?",
"Please give their full name and id."
] | [
"SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id",
"SELECT T1.name_first , T1.name_last, COUNT(*) FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id",
"SELECT T1.name_first , T1.name_last, COUNT(*) FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1",
"SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;"
] | What are the manager's first name, last name and id who won the most manager award? | SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1; | baseball_1 |
[
"How many players have won player awards?",
"Please list their full names.",
"Among them, who won the most player awards? List their full name and id.",
"How about top 3?"
] | [
"SELECT COUNT(*) FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id",
"SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id",
"SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;",
"SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;"
] | Which 3 players won the most player awards? List their full name and id. | SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3; | baseball_1 |
[
"Which countries do players come from?",
"How many players are from each country?",
"Which country provided the most players?",
"What are the three countries that provided the fewest players?"
] | [
"SELECT birth_country FROM player",
"SELECT birth_country, COUNT(*) FROM player GROUP BY birth_country",
"SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) DESC LIMIT 1;",
"SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3;"
] | List three countries which are the origins of the least players. | SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3; | baseball_1 |
[
"How many left-handed batters are there?",
"How about the right-handed batters?",
"Out of those batters, how many were born in California?",
"How about those born in the USA?"
] | [
"SELECT count(*) FROM player WHERE bats = 'L';",
"SELECT count(*) FROM player WHERE bats = 'R';",
"SELECT count(*) FROM player WHERE birth_state = 'CA' AND bats = 'R';",
"SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'"
] | How many players born in USA are right-handed batters? That is, have the batter value 'R'. | SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R'; | baseball_1 |
[
"What is the average height of all players?",
"What is the average height of players from 'University of Akron'?",
"How about for those from Yale University?"
] | [
"SELECT avg(height) FROM player",
"SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'University of Akron';",
"SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University'"
] | What is the average height of the players from the college named 'Yale University'? | SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University'; | baseball_1 |
[
"What is the average salary of all teams?",
"What is the average salary of each team?",
"What is the highest salary of each team?",
"Please also give the team name, id and maximum salary."
] | [
"SELECT avg(salary) FROM salary",
"SELECT T1.name , avg(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;",
"SELECT T1.name , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;",
"SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;"
] | What is the highest salary among each team? List the team name, id and maximum salary. | SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id; | baseball_1 |
[
"What is the average salary of all teams?",
"What about for each team?",
"Can you order the results by average salary?",
"Please give the first one with its name and id."
] | [
"SELECT avg(salary) FROM salary",
"SELECT T1.name , avg(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;",
"SELECT T1.name , avg(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary)",
"SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1;"
] | What are the name and id of the team offering the lowest average salary? | SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1; | baseball_1 |
[
"Which players have won an award?",
"Who won an award in 1960?",
"How about in 1961?",
"Among the players, who won awards both in 1960 and in 1961?"
] | [
"SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 ON T1.Player_id = T2.Player_id GROUP BY T2.Player_id",
"SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 ON T1.Player_id = T2.Player_id WHERE T2.year = 1960 GROUP BY T2.Player_id",
"SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 ON T1.Player_id = T2.Player_id WHERE T2.year = 1961 GROUP BY T2.Player_id",
"SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 ON T1.Player_id = T2.Player_id WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961"
] | Find the players' first name and last name who won award both in 1960 and in 1961. | SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 ON T1.Player_id = T2.Player_id WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961 | baseball_1 |
[
"How many players have a weight greater than 220?",
"How about greater than 230?",
"How many players have a weight greater than 220 or height shorter than 75?",
"Please list their full names."
] | [
"SELECT COUNT(*) FROM player WHERE weight > 220",
"SELECT COUNT(*) FROM player WHERE weight > 230",
"SELECT COUNT(*) FROM player WHERE weight > 220 OR height < 75",
"SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75"
] | List players' first name and last name who have weight greater than 220 or height shorter than 75. | SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75 | baseball_1 |
[
"How many times did the Boston Red Stockings win in postseason?",
"What is the average score of the games that it won?",
"How about the the maximum score?"
] | [
"SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';",
"SELECT avg(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';",
"SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';"
] | List the maximum scores of the team Boston Red Stockings when the team won in postseason? | SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'; | baseball_1 |
[
"How many times did the Boston Red Stockings win in postseason?",
"How many time did the Chicago White Stockings win in postseason?",
"How many times did the Boston Red Stockings lose in postseason?",
"How about the number in 2009?"
] | [
"SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';",
"SELECT COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Chicago White Stockings';",
"SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'",
"SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;"
] | How many times did Boston Red Stockings lose in 2009 postseason? | SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009; | baseball_1 |
[
"Which teams have had victories?",
"How about in 2008 postseason?",
"Among the results, which team has had the fewest victories?",
"How about the team with the most victories?"
] | [
"SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br GROUP BY T1.team_id_winner",
"SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner",
"SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) ASC LIMIT 1;",
"SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;"
] | What are the name and id of the team with the most victories in 2008 postseason? | SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1; | baseball_1 |
[
"How many wins does the team Boston Red Stockings have?",
"How many wins did the team Boston Red Stockings have in 2008?",
"How about the wins in each year?"
] | [
"SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'",
"SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2008",
"SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year"
] | What is the number of wins the team Boston Red Stockings got in the postseasons each year in history? | SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year | baseball_1 |
[
"How many games were there in 1885?",
"How about in 1900?",
"How many games resulted in ties?",
"How about the number in 1885?"
] | [
"SELECT count(*) FROM postseason WHERE YEAR = 1885",
"SELECT count(*) FROM postseason WHERE YEAR = 1900",
"SELECT count(*) FROM postseason WHERE ties = 1;",
"SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;"
] | How many games in 1885 postseason resulted in ties (that is, the value of "ties" is '1')? | SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1; | baseball_1 |
[
"What is the average salary paid by team Boston Red Stockings?",
"How about the average salary paid in 2010?",
"What is the total salary in this year?"
] | [
"SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'",
"SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010",
"SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010"
] | What is the total salary paid by team Boston Red Stockings in 2010? | SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010 | baseball_1 |
[
"Show the player ids of the players in the team Boston Red Stockings in 2001.",
"How about in 2000?",
"How many players were there that year?"
] | [
"SELECT player_id FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2001 GROUP BY player_id",
"SELECT player_id FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000 GROUP BY player_id",
"SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000 GROUP BY player_id"
] | How many players were in the team Boston Red Stockings in 2000? | SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000 | baseball_1 |
[
"What is the highest salary out of all the players?",
"How about in 2001?",
"Could you please give the top three highest salaries from that year?"
] | [
"SELECT MAX(salary) FROM salary",
"SELECT MAX(salary) FROM salary WHERE YEAR = 2001",
"SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;"
] | List the 3 highest salaries of the players in 2001? | SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3; | baseball_1 |
[
"What were all the salary values of players in 2012?",
"How about in 2010?",
"What is the average number of these results?",
"Could please give all the salary values of players in 2010 and 2001?"
] | [
"SELECT salary FROM salary WHERE YEAR = 2012",
"SELECT salary FROM salary WHERE YEAR = 2010",
"SELECT avg(salary) FROM salary WHERE YEAR = 2010",
"SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001"
] | What were all the salary values of players in 2010 and 2001? | SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001 | baseball_1 |
[
"How many players are there in the hall of fame?",
"How many of them entered each year?",
"Which year has the fewest people?"
] | [
"SELECT COUNT(*) FROM hall_of_fame",
"SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid",
"SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1"
] | In which year did the least people enter hall of fame? | SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1; | baseball_1 |
[
"Which city is \"Columbia Park\" located in?",
"How many games were played in this park?",
"How about in year 1908?",
"How about in year 1907?"
] | [
"SELECT city FROM park WHERE park_name = \"Columbia Park\"",
"SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T2.park_name = 'Columbia Park';",
"SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1908 AND T2.park_name = 'Columbia Park';",
"SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';"
] | How many games were played in park "Columbia Park" in 1907? | SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park'; | baseball_1 |
[
"Which park is located in Atlanta?",
"How many games were played in this city?",
"How about the number in 2010?",
"How about the number in 2000?"
] | [
"SELECT park_name FROM park WHERE city = 'Atlanta'",
"SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T2.city = 'Atlanta';",
"SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2010 AND T2.city = 'Atlanta';",
"SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';"
] | How many games were played in city Atlanta in 2000? | SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta'; | baseball_1 |
[
"What is the total home game attendance of team Cleveland Forest Citys?",
"How about the number for Boston Red Stockings?",
"Can you please give the results for 2005?",
"How about the number from 2000 to 2010?"
] | [
"SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Cleveland Forest Citys'",
"SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'",
"SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2005;",
"SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;"
] | What is the total home game attendance of team Boston Red Stockings from 2000 to 2010? | SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010; | baseball_1 |
[
"How many players with first name Len and last name Barker are there?",
"What is the average salary that he won in his career?",
"What is the total salary that he won in his career?",
"How about the total salary between 1985 to 1990?"
] | [
"SELECT COUNT(*) FROM player WHERE name_first = 'Len' AND name_last = 'Barker'",
"SELECT avg(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker'",
"SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker'",
"SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;"
] | How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total? | SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990; | baseball_1 |
[
"In which parks does the team \"Washington Nationals\" play games?",
"How many players have played for this team?",
"Could you please list their full names?",
"How about names of the players that played for this team in both 2005 and 2007"
] | [
"SELECT park FROM team WHERE name = \"Washington Nationals\" GROUP BY park",
"SELECT COUNT(*) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T3.name = 'Washington Nationals'",
"SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T3.name = 'Washington Nationals' GROUP BY T2.player_id",
"SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'"
] | List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. | SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals' | baseball_1 |
[
"In which parks does the team \"Boston Red Stockings\" play games?",
"How many home games did the team Boston Red Stockings play?",
"How about the number from 1990 to 2000?"
] | [
"SELECT park FROM team WHERE name = \"Boston Red Stockings\" GROUP BY park",
"SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'",
"SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;"
] | How many home games did the team Boston Red Stockings play from 1990 to 2000 in total? | SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000; | baseball_1 |
[
"How many attendances did each team have in 1980?",
"Could you please order the results by the attendance?",
"Which team had the least number of attendances?"
] | [
"SELECT T2.name, T1.attendance FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 GROUP BY T2.name",
"SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 GROUP BY T2.name ORDER BY T1.attendance ASC",
"SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;"
] | Which team had the least number of attendances in home games in 1980? | SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1; | baseball_1 |
[
"How many parks does each state have?",
"Which states have more than 3 parks?",
"Which states have more than 2 parks?"
] | [
"SELECT state, count(*) FROM park GROUP BY state",
"SELECT state FROM park GROUP BY state HAVING count(*) > 3;",
"SELECT state FROM park GROUP BY state HAVING count(*) > 2;"
] | List the names of states that have more than 2 parks. | SELECT state FROM park GROUP BY state HAVING count(*) > 2; | baseball_1 |
[
"How many parks does each city have?",
"Which cities have 2 or more parks?",
"Which cities have 3 or more parks?",
"How about those with 2 to 4 parks?"
] | [
"SELECT city, count(*) FROM park GROUP BY city",
"SELECT city FROM park GROUP BY city HAVING count(*) >= 2;",
"SELECT city FROM park GROUP BY city HAVING count(*) >= 3;",
"SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;"
] | Which cities have 2 to 4 parks? | SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4; | baseball_1 |
[
"What is the average enrollment?",
"Which school was founded the earliest?",
"Which school has the largest enrollment?",
"When was it founded?"
] | [
"SELECT AVG(enrollment) FROM university",
"SELECT School FROM university ORDER BY founded ASC LIMIT 1",
"SELECT School FROM university ORDER BY enrollment DESC LIMIT 1",
"SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1"
] | When was the school with the largest enrollment founded? | SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1 | university_basketball |
[
"Which one is the the newest school?",
"Among the schools, which ones were founded before 1800?",
"Can you list the school names ordered by year founded in decreasing order?",
"Please give the year that the first non public school was founded."
] | [
"SELECT School FROM university ORDER BY founded DESC LIMIT 1",
"SELECT School FROM university WHERE founded < 1800",
"SELECT School FROM university ORDER BY founded DESC",
"SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1"
] | Find the founded year of the newest non public school. | SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1 | university_basketball |
[
"How many games are there?",
"What is the lowest acc percent among the competitions?",
"Can you order the schools by acc percent in descending order?",
"What is the highest acc percent socre?"
] | [
"SELECT COUNT(*) FROM basketball_match",
"SELECT MIN(acc_percent) FROM basketball_match",
"SELECT Team_Name FROM basketball_match ORDER BY acc_percent DESC",
"SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1"
] | What is the highest acc percent score in the competition? | SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1 | university_basketball |
[
"Please give me all the acc percent scores.",
"Which school has the lowest acc percent score?",
"What is its primary conference?"
] | [
"SELECT ACC_Percent FROM basketball_match",
"SELECT t1.School FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1",
"SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1"
] | What is the primary conference of the school that has the lowest acc percent score in the competition? | SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1 | university_basketball |
[
"Which schools have participated in a basketball match?",
"How many are there?",
"Which one has been founded for the longest time?",
"Please list its team name and acc regular season score"
] | [
"SELECT t1.school FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id",
"SELECT COUNT(t1.school) FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id",
"SELECT t1.school FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1",
"SELECT t2.team_name , t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1"
] | What is the team name and acc regular season score of the school that was founded for the longest time? | SELECT t2.team_name , t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1 | university_basketball |
[
"Which school has North Carolina as its team name?",
"What is its location?",
"How about the school that has Clemson as its team name?",
"Please list its location and all games score."
] | [
"SELECT t1.School FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'North Carolina'",
"SELECT t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'North Carolina'",
"SELECT t1.school FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'",
"SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'"
] | Find the location and all games score of the school that has Clemson as its team name. | SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson' | university_basketball |
[
"How many colleges are there?",
"Please order them by founding year.",
"Which one is the oldest?",
"Please list its enrollment and primary_conference."
] | [
"SELECT COUNT(*) FROM university",
"SELECT School FROM university ORDER BY founded",
"SELECT School FROM university ORDER BY founded LIMIT 1",
"SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1"
] | Show the enrollment and primary_conference of the oldest college. | SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1 | university_basketball |
[
"What is the average enrollment of all schools?",
"Could you please order the schools by their enrollment?",
"What is the total enrollment of all schools?",
"Please also list the minimum enrollment."
] | [
"SELECT avg(enrollment) FROM university",
"SELECT School FROM university ORDER BY enrollment",
"SELECT sum(enrollment) FROM university",
"SELECT sum(enrollment) , min(enrollment) FROM university"
] | What is the total and minimum enrollment of all schools? | SELECT sum(enrollment) , min(enrollment) FROM university | university_basketball |
[
"Which schools have participated in a basketball match?",
"How many are there?",
"How about the schools that have not participated in a basketball match?",
"How many are there?"
] | [
"SELECT School FROM university as T1 JOIN basketball_match as T2 ON T1.School_ID = T2.School_ID",
"SELECT COUNT(School) FROM university as T1 JOIN basketball_match as T2 ON T1.School_ID = T2.School_ID",
"SELECT School FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)",
"SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)"
] | How many schools do not participate in the basketball match? | SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match) | university_basketball |
[
"How many public schools are there?",
"Please list their names.",
"Please also list the schools that were founded after 1850."
] | [
"SELECT COUNT(school) FROM university WHERE affiliation = 'Public'",
"SELECT school FROM university WHERE affiliation = 'Public'",
"SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'"
] | Find the schools that were either founded after 1850 or public. | SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public' | university_basketball |
[
"How many schools are there?",
"Please list the years they were founded.",
"Please list their locations.",
"how many of them are in NY?"
] | [
"SELECT COUNT(school) FROM university",
"SELECT Founded FROM university",
"SELECT LOCATION FROM university",
"SELECT count(*) FROM university WHERE LOCATION LIKE \"%NY%\""
] | Find how many school locations have the word 'NY'. | SELECT count(*) FROM university WHERE LOCATION LIKE "%NY%" | university_basketball |
[
"What is the average enrollment size?",
"Which schools have basketball team?",
"Please list the enrollment of these schools.",
"Which of them have enrollments that are smaller than the average enrollment size?",
"Please list their team names."
] | [
"SELECT avg(enrollment) FROM university",
"SELECT School FROM university as T1 JOIN basketball_match as T2 ON T1.School_ID = T2.School_ID",
"SELECT School, Enrollment FROM university as T1 JOIN basketball_match as T2 ON T1.School_ID = T2.School_ID",
"SELECT School FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university)",
"SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university)"
] | Find the team names of the universities whose enrollments are smaller than the average enrollment size. | SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university) | university_basketball |
[
"What are the different affiliation types of these schools?",
"Which universities have over a 20000 enrollment size?",
"Can you also list their affiliation type?",
"How many are there in each affiliation group?"
] | [
"SELECT DISTINCT affiliation FROM university",
"SELECT School FROM university WHERE enrollment > 20000",
"SELECT School, affiliation FROM university WHERE enrollment > 20000",
"SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation"
] | Find the number of universities that have over a 20000 enrollment size for each affiliation type. | SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation | university_basketball |
[
"Tell me Wilson's date of registration.",
"Tell me the date of his latest logon.",
"How about the dates of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"?"
] | [
"SELECT date_of_registration FROM Students WHERE personal_name = \"Wilson\"",
"SELECT date_of_latest_logon FROM Students WHERE personal_name = \"Wilson\"",
"SELECT date_of_latest_logon FROM Students WHERE family_name = \"Jaskolski\" OR family_name = \"Langosh\""
] | What are the dates of the latest logon of the students with family name "Jaskolski" or "Langosh"? | SELECT date_of_latest_logon FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" | e_learning |
[
"How many students are there?",
"How many students have personal names that contain the word \"wel\"?",
"How many students have personal names that contain the word \"son\"?"
] | [
"SELECT COUNT(*) FROM Students",
"SELECT COUNT(*) FROM Students WHERE personal_name LIKE \"%wel%\"",
"SELECT COUNT(*) FROM Students WHERE personal_name LIKE \"%son%\""
] | How many students have personal names that contain the word "son"? | SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%" | e_learning |
[
"Tell me the number of tests with result \"Pass\".",
"Tell me the number of tests with result \"Fail\".",
"List each test result and its count in descending order of count."
] | [
"SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = \"Pass\"",
"SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = \"Fail\"",
"SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC"
] | List each test result and its count in descending order of count. | SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC | e_learning |
[
"Tell me the personal name of the course author that teaches the course with name \"advanced database\".",
"Tell me the login name of the course author that teaches the course with name \"advanced database\"."
] | [
"SELECT T1.personal_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"advanced database\"",
"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 = \"advanced database\""
] | Find the login name of the course author that teaches the course with name "advanced database". | 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 = "advanced database" | e_learning |
[
"Tell me the personal name of the course author that teaches the course with name \"operating system\".",
"How about his address?",
"Tel me the addresses of the course authors who teach the course with name \"operating system\" or \"data structure\""
] | [
"SELECT T1.personal_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\"",
"SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"operating system\"",
"SELECT T1.address_line_1 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\""
] | Find the addresses of the course authors who teach the course with name "operating system" or "data structure". | SELECT T1.address_line_1 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" | e_learning |
[
"Tell me the personal name, family name, and author ID of the course author that teaches English.",
"How about that of course French.",
"Tell me the personal name, family name, and author ID of the course author that teaches the most courses."
] | [
"SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"English\"",
"SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"French\"",
"SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1"
] | Find the personal name, family name, and author ID of the course author that teaches the most courses. | SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1 | e_learning |
[
"Tell me Julio's address",
"Tell me the number of courses that he teaches.",
"Tell me the addresses and author IDs of the course authors that teach at least two courses."
] | [
"SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = \"Julio\"",
"SELECT COUNT(*) FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE personal_name = \"Julio\"",
"SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2"
] | Find the addresses and author IDs of the course authors that teach at least two courses. | SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2 | e_learning |
[
"Tell me Julio's address.",
"Tell me the number of courses that he teaches.",
"What are they?"
] | [
"SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = \"Julio\"",
"SELECT COUNT(T2.course_name) FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = \"Julio\"",
"SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = \"Julio\""
] | Find the names of courses taught by the tutor who has personal name "Julio". | SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = "Julio" | e_learning |
[
"Tell me the names and descriptions of courses that belong to the subject named \"Arts\".",
"Tell me the names and descriptions of courses that belong to the subject named \"Language\".",
"Tell me the names and descriptions of courses that belong to the subject named \"Computer Science\"."
] | [
"SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Arts\"",
"SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Language\"",
"SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Computer Science\""
] | Find the names and descriptions of courses that belong to the subject named "Computer Science". | SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = "Computer Science" | e_learning |
[
"Tell me the courses that belong to the subject named \"Computer Science\".",
"Tell me the courses that belong to the subject named \"Arts\".",
"Tell me the subject ID, subject name, and the corresponding number of available courses for each subject."
] | [
"SELECT T1.course_name FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Computer Science\"",
"SELECT T1.course_name FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Arts\"",
"SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id"
] | Find the subject ID, subject name, and the corresponding number of available courses for each subject. | SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id | e_learning |
[
"Tell me the number of courses that belong to \"Language\".",
"What are they?",
"Tell me the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order."
] | [
"SELECT COUNT(T1.course_name) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Language\"",
"SELECT T1.course_name FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Language\"",
"SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC"
] | Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order. | SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC | e_learning |
[
"What is the date of completion of the course named \"machine learning\"?",
"What is the date of enrollment of that course?",
"So what is the date of enrollment of the course named \"Spanish\"?"
] | [
"SELECT T2.date_of_completion FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"machine learning\"",
"SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"machine learning\"",
"SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"Spanish\""
] | What is the date of enrollment of the course named "Spanish"? | SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish" | e_learning |
[
"How many students are enrolled in \"English\"?",
"So what is the name of the course that has the least student enrollment?",
"How about the course that has the most student enrollment?"
] | [
"SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"English\"",
"SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) ASC LIMIT 1",
"SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1"
] | What is the name of the course that has the most student enrollment? | SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1 | e_learning |
[
"How many students are enrolled in \"French\"?",
"Okay, how many students are enrolled in \"AI\"?",
"So what are the names of the courses that have exactly 1 student enrollment?"
] | [
"SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"French\"",
"SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"AI\"",
"SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1"
] | What are the names of the courses that have exactly 1 student enrollment? | SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1 | e_learning |
[
"How many students are enrolled in \"AI\"?",
"Okay. Tell me the names of the courses that have student enrollment bigger than 5?",
"What are the descriptions and names of the courses that have student enrollment bigger than 2?"
] | [
"SELECT COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"AI\"",
"SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 5",
"SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2"
] | What are the descriptions and names of the courses that have student enrollment bigger than 2? | SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2 | e_learning |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.