LEFT JOIN PROBLEM
its strange but IMAGES,RATINGS,COMMENTS are exactly the same and they need to be differnt, Am i doing something wrong?
SELECT users.*,COUNT(images.id) AS images,COUNT(ratings.id) AS ratings,COUNT(comments.id) AS comments
FROM users
LEFT JOIN images ON users.id=images.userid
LEFT JOIN comments ON users.id=comments.userid
LEFT JOIN ratings ON users.id=ratings.userid
GROUP BY users.id
Subject
Written By
Posted
LEFT JOIN PROBLEM
June 28, 2005 06:17AM
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.