I have a table e.g.
Artist Title Song Key
A Title A A
A Title A B
A Title A F
B Title B A
I want to return each individual song but also show how many versions there are of that song e.g. Ideal results would be:
Artist Title How_many
A Title A 3
B Title B 1
This is what I'm trying but the count counts all tracks and not just from the current line:
SELECT *,
( select count(*)
from tracks
where artist=artist
AND title=title ) as How_many
from tracks
where easytosing='Yes'
group by title, artist
order by track_id desc
Is this possible using a nested query or is there a better way?