Question: Creat a SELECT statement that returns three columns from the Customers table named first_name, last_name and full_name that combines the last_name and first_name columns. Format

Creat a SELECT statement that returns three columns from the Customers table named first_name, last_name and full_name that combines the last_name and first_name columns.

Format this column with the last name, a comma, a space, and the first name like this:

Doe, John

Sort the result set by the last_name column in ascending sequence.

Return only the customers whose last name begins with letters from M to Z.

NOTE: When comparing strings of characters, 'M' comes before any string of characters that begins with 'M'. For example, 'M' comes before 'Murach'.

MY CODE :

SELECT last_name,first_name,CONCAT(last_name,', ',first_name) AS full_name

FROM customers

WHERE last_name >="M"

ORDER BY last_name

ERROR

test_5_ordered (test_simple_queries.TestSimpleQueries) (0.0/2.0)

Test Failed: Results do not match - Please check to make sure you have the query ordered by last_name in ascending 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!