Re: count(*)
On 2 Oct, 11:30, Séverin Richard <severin.rich...@free.fr> wrote:
> hi all,
>
> ____________________
> select hspectacle.hnum, count(*)
>
> from
> hspectacle left outer join v_jprix
> on( hspectacle.hnum=v_jprix.hnum )
>
> group by hspectacle.hnum
> ____________________________
>
> gives
> hnum | count(*)
> 1232 2
> 1564 8
> 461 7
> ...
>
> But i want also the rows with count(*) = 0
>
> How to do it???
> thx
There cannot be a row with count = 0 as that implies that there are no
rows to count???
Indeed, the join seems redundant in this query as the grouping is done
on only the first table. So your query is equivalent to:
SELECT
hspectacle.hnum,
count(*)
FROM hspectacle
GROUP BY hspectacle.hnum
|