Subject | Re: [firebird-support] Query Help? |
---|---|
Author | Ann W. Harrison |
Post date | 2004-10-31T21:55:14Z |
At 12:36 PM 10/31/2004, Lee Jenkins wrote:
unique. If so, this statement:
no difference between sum(price) and price. Could you restate the
problem?
Regards,
Ann
>I have a table with the following relevant fields:If I understand, the combination ItemID and OrderID is
>
>ItemID // Integer
>ProductDescription // Varchar
>OrderID // Integer
unique. If so, this statement:
>SELECTmakes no sense whatsoever. If you group by a unique key, there is
> Count(ITEMS.PRODUCTDESCRIPTION) AS CountItems,
> Sum(ITEMS.ITEMPRICE) AS TotalItems,
> ITEMS.ORDERID, ITEMS.PRODUCTDESCRIPTION,
>FROM ITEMS
>GROUP BY
> ITEMS.ORDERID,
> ITEMS.PRODUCTDESCRIPTION,
> HAVING ITEMS.ORDERID = :OrdID;
no difference between sum(price) and price. Could you restate the
problem?
Regards,
Ann