Prepare and execute each of the queries listed using the Adv

Prepare and execute each of the queries listed using the \"Adventureworks2012\" database in SQL: The Adventureworks2012 Database can be located here https://msftdbprodsamples.codeplex.com/releases/view/93587

Problem: Write a query to find out how many people have a Seattle address. List the Address ID, Address Lines (Street and Apt number if available), City, StateProvince ID, Name, and Business Entity ID. Use the Person.Address, Person.AddressType, and Person.BusinessEntityAddress tables. Sort by Address ID. You should get 141 records for the results.

Don\'t try this if your using a 32bit based computer x86. need amd64, x86_64 on intel. Someone else tried to respond, but said they got that error. If you are a computer science expert you should be aware of this

Solution

SELECT AddressID,AddressLine1,AddressLine2,City,StateProvinceID,PostalCode,Name,Business Id

FROM [AdventureWorks2012].[Person].[Address]

ORDER BY AddressID

This is followed by:

SELECT TOP 1000 [BusinessEntity],[rowguid],[ModifiedDate]

FROM [AdventureWorks2012].[Person].[BusinessEntity]

note:

SELECT AddressID,AddressLine1,AddressLine2,City,StateProvinceID,PostalCode,Name,Business Id->This statement lists all the fields

[AdventureWorks2012].[Person].[Address] is the table name

ORDER BY AddressID->sorts by AddressID

Prepare and execute each of the queries listed using the \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site