- Write a query that displays all invoices for which the customer’s country is different from the billing country. Your query should return all columns from the
SELECT artist.name AS artist_name, COUNT(tr.track_id) AS num_of_songs FROM artist JOIN album AS al ON artist.artist_id = al.artist_id JOIN track AS tr ON al.album_id = tr.album_id JOIN genre AS gr ON tr.genre_id = gr.genre_id WHERE gr.name = "Rock" AND (tr.composer = artist.name) GROUP BY artist_name HAVING COUNT(tr.name) >= 5 ORDER BY artist_name ASC;
What I expected to happen:
What actually happened:
I feel like I am close but I am still not doing it right.