Question: figuring out the code on this question: View called CustomerInfo (4 points): CustomerID The CustomerInfo view should include these columns: FullName (concatenate FirstName, MiddleName, &

 figuring out the code on this question:


  1. View called CustomerInfo (4 points):
    • CustomerID


The CustomerInfo view should include these columns:

  • FullName (concatenate FirstName, MiddleName, & LastName with spaces in between)
  • Address (concatenate StreetAdddress, City, State, & ZipCode with spaces in between)
  • PrimaryEmail (If customer has no email, show NULL for the customer's email address)


Hints:

  1. Start by SELECTing CustomerID and concatenating FullName & Address from Customers.
  2. JOIN into CustomerEmails.
    • We need the view to include Customers who don't have emails, so the join type is important here.
    • We also only want the Primary Email, so only include those rows from the CustomerEmails table.
    • Please keep in mind, you can have more than 1 predicate in joins. The ON clause might be a good place to specify you only want Primary Email rows from the CustomerEmails table.


OUTPUT:

CustomerID FullName 1 2 3 4 5 6 7 8 9 10

CoursHeroTranscribedText

CustomerID FullName 1 2 3 4 5 6 7 8 9 10 Edgar Frank Codd Kim Drexler Ralph Kimpball Jane Muriel Anderson Jimmy McGill Sally Marie McFields Walter Hartwell White Nicole McDonald Gustavo Fring Elaine Benes Odonnel Address EmailAddress 12309 Normalization Street Los Angeles CA 90059 efcodd@gmail.com kdrexler@yahoo.com rkimball@hotmail.com 666 Samoa Street Albuquerque NM 87190 5368 Dimensional BLVD Chicago IL 60659 8519 Sego Lilly Lane Devner CO 80266 666 Samoa Street Albuquerque NM 87190 562 Ashton Street Seattle WA 98178 9674 Chemistry Lane Albuquerque NM 87106 2389 Sunflower Drive Orlando FL 32827 489 Affluence Road Albuquerque NM 87121 2839 Park Street New York NY 10075 NULL jmcgill@gmail.com smcfields@yahoo.com whwhite @hotmail.com nmcdomald@bing.com gusfring@mindyourbusiness.com ebenes@bing.com

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 Databases Questions!