Mysql SQL join question
Posted
by David
on Stack Overflow
See other posts from Stack Overflow
or by David
Published on 2010-06-08T20:37:43Z
Indexed on
2010/06/08
20:42 UTC
Read the original article
Hit count: 264
I am trying to find all deals information along with how many comments they have received. My query
select deals.*, count(comments.comments_id) as counts from deals left join comments on comments.deal_id=deals.deal_id where cancelled='N'
But now it only shows the deals that have at least one comment. What is the problem?
© Stack Overflow or respective owner