Question: SQL Write a Select statement that returns each customers (1) name (formatted as FirstName LastName) with the alias 'name', (2) the number of orders that
SQL
Write a Select statement that returns each customers (1) name (formatted as "FirstName LastName") with the alias 'name', (2) the number of orders that the customer have placed with the alias 'No. of orders' , (3) only the year of the CardExpirers column with the alias 'Expiration', and (4) a string literal 'Hotmail' with the alias 'Email', If the email address is a Hotmail account; otherwise the string literal is 'Other'. Return all the customers, even those that do not have an order record. (4 rows affected)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
