|
Posted by Rik on 03/02/07 18:56
On Fri, 02 Mar 2007 19:48:29 +0100, Rik <luiheidsgoeroe@hotmail.com> wrote:
> john7 <johnmark@fastermail.com> wrote:
>> Thanks for your reply, the above statement is returning
>>
>> categoryid (count name for products 1) (count name for products 2)
>> 1 2 2
>> 2 1 0
>> 3 2 2
>
> Yup, just discovered that myself. Odd, as the manual states:
> "COUNT() .. Returns a count of the number of non-NULL values in the rows"
D'OH!
Now I know why this doesn't work.... GROUP BY is done in the end, so any
match will be repeated if the other join asks for more rows...
--
Rik Wasmus
Navigation:
[Reply to this message]
|