SQL DISTINCT plus count
php, sql
Solution
Try this:
SELECT `album`, COUNT(*) FROM `mp3` GROUP BY `album`
Problem
I currently have a table with album name, artist, and title in it (for Mp3s). On my webpage on the left I currently display all album names using: ``` SELEC DISTINCT `album` FROM `mp3` ``` But I would like to display the amount of each album next to it, for instance: ``` A Very Good Album (3) ``` Indicating that there are 3 entires in that record. Can I do this with SQL? Select Distinct, but also find out how many are with that album?