Database Management
primer-original-v2mediumDatabase Management07 Joins & Subqueryprimer-original-v2

Which statement would display the highest credit limit available in each income level in each city in the Customers table?

Answer options

A
SELECT city, income_level, MAX(cust_credit_limit) FROM customers GROUP BY city, income_level;
B
SELECT MAX(cust_credit_limit) FROM customers;
C
SELECT city, MAX(cust_credit_limit) FROM customers GROUP BY city;
D
SELECT income_level, MAX(cust_credit_limit) FROM customers GROUP BY income_level;

Correct answer: SELECT city, income_level, MAX(cust_credit_limit) FROM customers GROUP BY city, income_level;

Detailed Solution & Conceptual Analysis

This question has been retained as-is due to its unique context.

Key Engineering Takeaway

In Database Management, understanding the underlying mechanics of Database Management is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.

Related Database Management questions

Practice more Database Management questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.