Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a query that returns the alphabetized first letter of the customer's last name and the count of active and inactive customers. Limit the
Write a query that returns the alphabetized first letter of the customer's last name and the count of active and inactive customers. Limit the results to only those first letters that occur in the last_name colum of the customer table. Label the columns as follows: starts with is the first column and the first letter of the customer's last_name. active_count is the second column and the count of active customers (as defined in the textbook examples of Chapter 11). inactive_count is the third column and the count of inactive customers (as defined in the textbook examples of Chapter 11). The output should look like the following: | starts with active_count | inactive_count | ABC | A 18 | 55 | 21 01 491 3 17 | 01 11 | 21 251 01 421 1 | 49 1 01 31 01 13 | 1 13 I 01 21 | 1 571 21 10 | 1 10 I 01 281 01 Q 31 01 381 21 541 01 201 01 71 01 V 371 1| 3 0 +-- Y 23 rows in set (0.00 sec)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started