>Hello all,
>
>I'd like for the following code to work. The where is the important part that doesn't want to cooperate ;-)
>
>SELECT Field1, COUNT(IdCase) as TotCases;
>FROM Table1 ;
>group by Field1;
>where TotCases > 3
>
>So to only get the rows where TotCases is greater thant 3 how should I code my where?
When you want to filter your result by some of aggregate fields you should use HAVING clause instead of WHERE.
SELECT Field1, COUNT(IdCase) as TotCases;
FROM Table1 ;
group by Field1;
HAVING COUNT(IdCase) > 3
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.