human
Schema:
artists (id, name)
sqlite_sequence (name, seq)
albums (id, title, artist_id)
employees (id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email)
customers (id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id)
genres (id, name)
invoices (id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total)
media_types (id, name)
tracks (id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price)
invoice_lines (id, invoice_id, track_id, unit_price, quantity)
playlists (id, name)
playlist_tracks (playlist_id, track_id)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the name of tracks whose genre is Rock?
assistant
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = 'Rock';
human
List title of albums have the number of tracks greater than 10.
assistant
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;
human
List every album whose title starts with A in alphabetical order.
assistant
SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title;
human
What is title of album which track Balls to the Wall belongs to?
assistant
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = 'Balls to the Wall';
human
List every album's title.
assistant
SELECT title FROM albums;
human
What is the title of the album that was released by the artist whose name has the phrase 'Led'?
assistant
SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE "%Led%" ;