MySQL Forums
Forum List  »  Newbie

Re: How can i use COUNT struction in this example...
Posted by: Felix Geerinckx
Date: July 19, 2005 12:17AM

Alex Marcelo dos Santos wrote:

> If i execute this query the result is: 123.
> If i erase the clausule "COUNT" the result is 116 !!!
>
> The clausule DISTINCT is ignored when i use it with COUNT!!
> Why this???

Try

SELECT COUNT(DISTINCT tbUsuarios.id_usuario) ...

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
Re: How can i use COUNT struction in this example...
July 19, 2005 12: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.