|
Posted by Hugo Kornelis on 01/14/06 00:38
On 12 Jan 2006 16:01:25 -0800, pipe.jack@gmail.com wrote:
>Excellent, thanks!
>
>Another one for you:
>How many orders included a product. If the quantity of the product in a
>single order is more then 1 then it should still count as 1 since I'm
>interested in the number of orders.
>
>Thanks again for all and any help.
Hi Jack,
SELECT ProductName, Options, COUNT(*)
FROM OrderDetails
GROUP BY ProductName, Options
--
Hugo Kornelis, SQL Server MVP
[Back to original message]
|