View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 10:44 AM
Philip Reimer
 
Posts: n/a
Default Re: Simple newbie COUNT question

lister schrieb:
> How do I get the results of a SELECT, and count the results at the
> same time?
>
> I've tried:
>
> SELECT productname, COUNT(*) AS cnt from URL
>
> but this gives:
> Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP
> columns is illegal if there is no GROUP BY clause


You need to add a "group by " to your statement (like the error message
tells you).
Reply With Quote