Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Will other people benefit if I act according to this value?

Answered: 1 week ago