Date |Thu, 26 Jul 2001 21:11:20 +0100
>From |"Graham Nichols" <[EMAIL PROTECTED]>

Hello!

GN> Hi Grigory,

GN> your query below only runs without error if I leave out the word DISTINCT.

>> SELECT web_date, dayofmonth(web_date) AS d, COUNT(DISTINCT IP_address) AS c
>> FROM web_stats GROUP BY d ORDER BY web_date

GN> so

GN> SELECT web_date, dayofmonth(web_date) AS d, COUNT (IP_address) AS c
GN> FROM web_stats GROUP BY d ORDER BY web_date
GN> runs OK, but NOT if I include the DISTINCT.  I don't know what's wrong.

GN> regards,   Graham

You just need to remove whitespace after COUNT.
COUNT(DISTINCT IP_adress) work well.
COUNT (DISTINCT IP_adress) drop ERROR 1064


___________________________________________________________________
For technical support contracts, visit https://order.mysql.com/
This email is sponsored by SWSoft, http://www.asplinux.ru/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Grigory Bakunov <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB / SWSoft
/_/  /_/\_, /___/\___\_\___/
       <___/   www.mysql.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to