List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 12 2003 9:55pm
Subject:Re: COUNT(DISTINCT ...)
View as plain text  
At 16:42 -0500 3/12/03, Bob Sawyer wrote:
>HELP! I'm getting the following error:
>
>--------------
>Error (SQL):
>SELECT date, subject, location, private, id, duration, dategroup_id,
>COUNT(DISTINCT subject) AS appointment_count, inituserid FROM mgw_calendar
>WHERE userid=1 AND SUBSTRING(date,1,8) = '20030312' GROUP BY date, subject,
>location, private, id, duration, dategroup_id, inituserid ORDER BY date
>
>Error (MSG):
>You have an error in your SQL syntax near 'DISTINCT subject) AS
>appointment_count, inituserid FROM mgw_calendar WHERE useri' at line 1
>---------------
>
>
>I'm using MySQL 3.22.32 .... does COUNT(DISTINCT ...) not work with this
>version?

No, not until 3.23.2.

>
>Thanks,
>
>Bob Sawyer
>-----------
>Pixellated!
>Design:Develop:Deliver
>www.pixellated.org

Thread
COUNT(DISTINCT ...)Bob Sawyer12 Mar
  • Re: COUNT(DISTINCT ...)Paul DuBois12 Mar