Newbie SQL question

Hello everyone. I am using the NORTHWIND sample database in SQL Server 2000
and am trying to do the following query, but I'm not sure how to go about
it:

A query that shows the Product ID and Product Name for all products that
been purchased by at least 3 different customers.

Any ideas? I really need some help on this one! Thanks.
Curtis Gilchrist [ Sa, 16 Oktober 2004 05:33 ] [ ID #343978 ]

Re: Newbie SQL question

Homework? Here's a clue:

...
HAVING COUNT(DISTINCT ...) >= 3

--
David Portas
SQL Server MVP
--
David Portas [ Sa, 16 Oktober 2004 11:02 ] [ ID #343980 ]
Datenbanken » comp.databases.ms-sqlserver » Newbie SQL question

Vorheriges Thema: Performance question - Restarting the SQL server resolved my timeout problem
Nächstes Thema: Newbie SQL question