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;
Explanation
Quick AnswerThe correct answer is SELECT city, income_level, MAX(cust_credit_limit) FROM customers GROUP BY city, income_level; because it directly addresses the core logic of Database Management.
GROUP BY both city and income_level with MAX gives the required result.