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

Write a query that returns the alphabetized first letter of the customer's last name and the count of active 

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 | A 1 B IC D IE F IG I 1 J K L IM IN 10 IP 10 R S T IV W Y I 1 1 1 I 1 I 23 rows in set (0.00 sec) 18 1 55 1 49 1 17 | 11 I 25 1 42 1 49 1 3 13 1 13 I 21 | 57 1 10 I 10 | 28 1 31 38 1 54 1 201 71 37 | 3 | 21 01 31 21 01 11 01 01 11 01 1 | 21 11 01 01 01 21 01 01 11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

It seems youre asking for help with writing a SQL query based on the instructions in the image provi... 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

Programming With Microsoft Visual Basic 2017

Authors: Diane Zak

8th Edition

1337102121, 9781337517058, 978-1337102124

More Books

Students also viewed these Databases questions

Question

What is a social role? (p. 30)

Answered: 1 week ago