QuestionQ132

VerifiedReporting Aggregated Data Using the Group Functions

Examine the structure of the CUSTOMERS table:

Question Image

CUSTNO is the table's primary key. You need to determine whether any customers' details were entered more than once under different CUSTNO values by listing all duplicate names.

Which two methods can be used to obtain the required result?

Choose two
Explanation

A self-join can match customer rows with the same CUSTNAME and different CUSTNO values. A subquery can identify names that occur more than once, such as by grouping on CUSTNAME and filtering for a count greater than one. Outer joins are not required because only rows with matching duplicate names are relevant.

Community Discussion

No comments yet. Be the first to start the discussion!