SQL> select * from orddd;
ORDERID PRODID
-- --
2 5
1 3
1 2
2 7
1 5
SQL> select prodid,count(*) from orddd group by PRODID having count(*) > 1;
PRODID COUNT(*)
-- --
On 7/12/2012 1:49 PM, John Nichel wrote:
Hi all,
Lets say I have a table with two colums: 'orderid' and 'productid'. This
table contains line items for purchases in a store where a purchase could
be 1 or more line items (1 or more rows). A typical order may look like
this:
orderid | productid
Hi all,
Lets say I have a table with two colums: 'orderid' and 'productid'. This
table contains line items for purchases in a store where a purchase could
be 1 or more line items (1 or more rows). A typical order may look like
this:
orderid | productid
12345 | 9876
12345 | 6789
12345 | 76