I mean: "COUNT(DISTINCT city) is the condition you wish to apply to
each set".

I was thought, why "any 2 different addresses will be needed".

if there are 2 same cities belongs to same person , for example:

there is a set.

1 auckland
1 auckland

the COUNT(DISTINCT city) will count that set as one.

regards

anru

On Dec 15, 4:58 pm, Rex Johnston <[email protected]> wrote:
> ctx2002 wrote:
> >>> COUNT(DISTINCT city) != COUNT(city)
> >> Good point.  Any 2 different addresses will be needed.
>
> >    COUNT(DISTINCT city) is apply to GROUP BY ,
>
> GROUP BY defines how you wish to assemble the set of rows.
> HAVING is the condition you wish to apply to each set, using set operators.
>
> I don't understand "is apply to".
>
> Cheers, Rex
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to