Re: Query question.

From: Andreas Ballenthin <ballenth_at_gmx.de>
Date: Thu, 06 Dec 2001 22:33:26 +0100
Message-ID: <3C0FE426.73675FED_at_gmx.de>


Hi,

> > SELECT customerID, sum(OrderAmount)
> > FROM TABLENAME
> > GROUP BY CustomerID;

> ...but I can't use sum(OrderAmount) in 'where' clause...

You should use

SELECT customerID, sum(OrderAmount)
  FROM TABLENAME
 GROUP BY CustomerID
 HAVING sum(OrderAmount) > [certain number];

Andreas Received on Thu Dec 06 2001 - 22:33:26 CET

Original text of this message