question
stringlengths 16
224
| schema
stringlengths 142
5.86k
| query
stringlengths 20
577
|
---|---|---|
Count the number of distinct artists who have volumes. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT COUNT(DISTINCT Artist_ID) FROM volume |
Please show the date of ceremony of the volumes that last more than 2 weeks on top. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 |
What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 |
Please show the songs that have result "nominated" at music festivals. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated" |
What are the songs in volumes that have resulted in a nomination at music festivals? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated" |
What are the issue dates of volumes associated with the artist "Gorgoroth"? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = "Gorgoroth" |
Return the issue dates of volumes that are by the artist named Gorgoroth. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 songs in volumes associated with the artist aged 32 or older? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32 |
Return names of songs in volumes that are by artists that are at least 32 years old. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32 |
What is the average weeks on top of volumes associated with the artist aged 25 or younger? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 |
Return the average number of weeks on top for volumes by artists that are at most 25 years old. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 are the famous title of the artists associated with volumes with more than 2 weeks on top? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 |
Return the famous titles for artists that have volumes that lasted more than 2 weeks on top. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 |
Please list the age and famous title of artists in descending order of age. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Famous_Title , Age FROM artist ORDER BY Age DESC |
What are the famous titles and ages of each artist, listed in descending order by age? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Famous_Title , Age FROM artist ORDER BY Age DESC |
What is the famous release date of the artist with the oldest age? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1 |
Return the famous release date for the oldest artist. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1 |
Please show the categories of the music festivals and the count. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Category , COUNT(*) FROM music_festival GROUP BY Category |
Return the number of music festivals of each category. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Category , COUNT(*) FROM music_festival GROUP BY Category |
What is the most common result of the music festival? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 |
Return the result that is most frequent at music festivals. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1 |
Please show the categories of the music festivals with count more than 1. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1 |
What are the categories of music festivals for which there have been more than 1 music festival? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1 |
What is the song in the volume with the maximum weeks on top? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1 |
Return the song in the volume that has spent the most weeks on top? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1 |
Find the famous titles of artists that do not have any volume. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume) |
What are the famous titles of artists who do not have any volumes? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume) |
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. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 |
What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | 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 |
What are the date of ceremony of music festivals with category "Best Song" and result "Awarded"? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Date_of_ceremony FROM music_festival WHERE Category = "Best Song" AND RESULT = "Awarded" |
Return the dates of ceremony corresponding to music festivals that had the category "Best Song" and result "Awarded". | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Date_of_ceremony FROM music_festival WHERE Category = "Best Song" AND RESULT = "Awarded" |
What is the issue date of the volume with the minimum weeks on top? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1 |
Return the issue date of the volume that has spent the fewest weeks on top. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1 |
How many distinct artists have volumes? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT COUNT(DISTINCT Artist_ID) FROM volume |
Count the number of artists who have had volumes. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT COUNT(DISTINCT Artist_ID) FROM volume |
Please show the results of music festivals and the number of music festivals that have had each, ordered by this count. | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC |
How many music festivals have had each kind of result, ordered descending by count? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC |
What are the issue dates of volumes associated with the artist aged 23 or younger? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23 |
Return the issue dates of volumes by artists who are at most 23 years old? | artist: Artist_ID (INT), Artist (TEXT), Age (INT), Famous_Title (TEXT), Famous_Release_date (TEXT)
volume: Volume_ID (INT), Volume_Issue (TEXT), Issue_Date (TEXT), Weeks_on_Top (REAL), Song (TEXT), Artist_ID (INT)
music_festival: ID (INT), Music_Festival (TEXT), Date_of_ceremony (TEXT), Category (TEXT), Volume (INT), Result (TEXT) | SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23 |
How many roller coasters are there? | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT count(*) FROM roller_coaster |
List the names of roller coasters by ascending order of length. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT Name FROM roller_coaster ORDER BY LENGTH ASC |
What are the lengths and heights of roller coasters? | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT LENGTH , Height FROM roller_coaster |
List the names of countries whose language is not "German". | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT Name FROM country WHERE Languages != "German" |
Show the statuses of roller coasters longer than 3300 or higher than 100. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100 |
What are the speeds of the longest roller coaster? | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1 |
What is the average speed of roller coasters? | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT avg(Speed) FROM roller_coaster |
Show the different statuses and the numbers of roller coasters for each status. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT Status , COUNT(*) FROM roller_coaster GROUP BY Status |
Please show the most common status of roller coasters. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1 |
List the status shared by more than two roller coaster. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2 |
Show the park of the roller coaster with the highest speed. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1 |
Show the names of roller coasters and names of country they are in. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT T2.Name , T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID |
Show the names of countries that have more than one roller coaster. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1 |
Show the name and population of the country that has the highest roller coaster. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT T1.Name , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1 |
Show the names of countries and the average speed of roller coasters from each country. | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT T1.Name , avg(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name |
How many countries do not have an roller coaster longer than 3000? | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT count(*) FROM country WHERE country_id NOT IN ( SELECT country_id FROM roller_coaster WHERE LENGTH > 3000 ) |
What are the country names, area and population which has both roller coasters with speed higher | roller_coaster: Roller_Coaster_ID (INT), Name (TEXT), Park (TEXT), Country_ID (INT), Length (REAL), Height (REAL), Speed (TEXT), Opened (TEXT), Status (TEXT)
country: Country_ID (INT), Name (TEXT), Population (INT), Area (INT), Languages (TEXT) | SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55 |
How many different captain ranks are there? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(DISTINCT rank) FROM captain |
Count the number of different ranks of captain. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(DISTINCT rank) FROM captain |
How many captains are in each rank? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(*) , rank FROM captain GROUP BY rank |
Count the number of captains that have each rank. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(*) , rank FROM captain GROUP BY rank |
How many captains with younger than 50 are in each rank? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank |
Count the number of captains younger than 50 of each rank. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank |
Sort all captain names by their ages from old to young. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name FROM captain ORDER BY age DESC |
What are the names of captains, sorted by age descending? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name FROM captain ORDER BY age DESC |
Find the name, class and rank of all captains. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name , CLASS , rank FROM captain |
What are the names, classes, and ranks of all captains? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name , CLASS , rank FROM captain |
Which rank is the most common among captains? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1 |
Return the rank for which there are the fewest captains. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1 |
Which classes have more than two captains? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2 |
Give the classes that have more than two captains. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2 |
Find the name of captains whose rank are either Midshipman or Lieutenant. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant' |
What are the names of captains that have either the rank Midshipman or Lieutenant? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant' |
What are the average and minimum age of captains in different class? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS |
Return the average and minimum age of captains in each class. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS |
Find the captain rank that has some captains in both Cutter and Armed schooner classes. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner' |
What are the ranks of captains that are both in the Cutter and Armed schooner classes? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner' |
Find the captain rank that has no captain in Third-rate ship of the line class. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line' |
What are the ranks of captains that have no captain that are in the Third-rate ship of the line class? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line' |
What is the name of the youngest captain? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name FROM captain ORDER BY age LIMIT 1 |
Return the name of the youngest captain. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name FROM captain ORDER BY age LIMIT 1 |
how many ships are there? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(*) FROM ship |
Count the number of ships. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(*) FROM ship |
Find the name, type, and flag of the ship that is built in the most recent year. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1 |
What is the name, type, and flag of the ship that was built in the most recent year? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1 |
Group by ships by flag, and return number of ships that have each flag. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(*) , flag FROM ship GROUP BY flag |
What are the different ship flags, and how many ships have each? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT count(*) , flag FROM ship GROUP BY flag |
Which flag is most widely used among all ships? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1 |
Return the flag that is most common among all ships. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1 |
List all ship names in the order of built year and class. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name FROM ship ORDER BY built_year , CLASS |
What are the names of ships, ordered by year they were built and their class? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name FROM ship ORDER BY built_year , CLASS |
Find the ship type that are used by both ships with Panama and Malta flags. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta' |
What types of ships have both ships that have Panama Flags and Malta flags? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta' |
In which year were most of ships built? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1 |
What is the year in which most ships were built? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1 |
Find the name of the ships that have more than one captain. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1 |
What are the names of ships that have more than one captain? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1 |
what are the names and classes of the ships that do not have any captain yet? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain) |
Return the names and classes of ships that do not have a captain? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain) |
Find the name of the ship that is steered by the youngest captain. | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1 |
What is the name of the ship that is commanded by the youngest captain? | captain: Captain_ID (INT), Name (TEXT), Ship_ID (INT), age (TEXT), Class (TEXT), Rank (TEXT)
Ship: Ship_ID (INT), Name (TEXT), Type (TEXT), Built_Year (REAL), Class (TEXT), Flag (TEXT) | SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1 |