QuestionQ69

VerifiedReporting Aggregated Data Using the Group Functions

The CUSTOMERS table contains these columns:

The CUSTOMER_ID column is the table's primary key.

You need to determine how geographically dispersed the customer base is. Which expression returns the number of distinct countries represented in the CUSTOMERS table?

Explanation

COUNT(DISTINCT UPPER(country_address)) counts each unique country value once after normalizing its case, so values that differ only by capitalization are treated as the same country.

Community Discussion

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