Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Each script must include the GETDATE(). function in the select statement To keep the queries more straightforward, use aliases. Section A Create SQL Scripts that:

  • Each script must include the GETDATE(). function in the select statement

To keep the queries more straightforward, use aliases.

Section A

Create SQL Scripts that:

  1. Select ALL the BusinessEntityID, LastName, and FirstName fields for the Person's table
    1. Fields should be in the above order.
    2. Add a sort to the query so LastName is alphabetized A - Z.
  2. Add the person's email address to Query #A1.
  3. Add the person's phone number to Query #A2, include the PhoneNumberType Name field (etc. cell, home, work).
  4. Add in the AddressLine1, City, StateProvinceID, and PostalCode fields to Query #A3
    1. Note: two different people could have the same address. This database is designed to store each unique address individually, so while in this case this detail for this address would only exist once in the database, it would be assigned to all individuals with that address.
    2. Note2: You will have to bring in two different Address tables to get this to portion to work.
  5. Modify the Query from #A4 to include the StateProvinceCode, CountryRegionCode, and Name.

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_2

Step: 3

blur-text-image_3

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

Cost Accounting A Managerial Emphasis

Authors: Charles T. Horngren, Srikant M.Dater, George Foster, Madhav

13th Edition

8120335643, 136126634, 978-0136126638

More Books

Students also viewed these Accounting questions