Hi I'm having trouble with a subquery and really need some help.
I'm trying to count to count the number of beats sold by a particular producer.
So the first thing I did was SELECT all the beats sold by that producer so I wrote the code
select name, production_no
from beats
where availability = 'Sold'
and p_staffid = 1;
'p_staffid' is the id number for the particular producer and the 'production_no' is the primary key for the beat itself. I have tested this code and it works perfectly.
But how do I count the results?