MySQL Forums
Forum List  »  General

Re: Comlicated SELECT statement. Help appreciated!
Posted by: nick
Date: March 14, 2005 05:31AM

I think this will do what you want to do:

SELECT a.albumid, p.albumid, count(p.albumid)
FROM albums AS a
LEFT JOIN photos AS p ON a.albumid = p.albumid
GROUP BY a.albumid

Options: ReplyQuote


Subject
Written By
Posted
Re: Comlicated SELECT statement. Help appreciated!
March 14, 2005 05:31AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.