|< < 31 > >|

Aggregation with grouping

For each Artist, how many Albums?

Join Artist and Album and then count.
select ar.artist, count(*) from artist ar join album al on ar.artist = al.artist group by ar.artist

artist count
Elvis Costello 11
The Detroit Cobras 6

|< < 31 > >|