Write a SQL query to create a table that contains the albumId and number of songs on the album with that albumId. HINT: Remember that count(*) will count the number of rows in each group of a GROUP BY statement.
You should get the following output:
sqlite> SELECT * FROM track_count LIMIT 10; 1|10 3|3 4|8 5|15 6|13 7|12 9|8 10|14 11|12 12|12
CREATE TABLE track_count as select "REPLACE THIS LINE WITH YOUR SOLUTION";
Answer:
======
create table track_count as
select <albumid_column>, count(*) from
<albums_table_name> group by <albumid_column>;
Please comment if you need any help.
Write a SQL query to create a table that contains the albumId and number of songs...