Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The objective of this activity is to hone your skills at manipulating data using SQL DML statements. Use the Query Editor throughout this activity. 1.Construct

The objective of this activity is to hone your skills at manipulating data using SQL DML statements. Use the Query Editor throughout this activity.

1.Construct and execute INSERT SQL statements to add the sample data in the following tables to the Customer and Address tables in the HandsOnOne database:

Sample Data for Customer table:

CustomerID-1,2,3,4

CustomerName-Western Suppy Company, Nick Harper, Alice Harper, Abacus Consulting

CustomerAddressID-1,3,3,4

Sample Data for Address table:

AddressID-1,2,3,4,

Street-2400 Broadway Drive,320 21st Street, 439 Skyline Dr., 56 Park Avenue

City-Missoula, Billings, Denver, New York

State- MT, MT, CO, NY

ZipCode- 59802, 59101, 80002,1000

2. Construct and execute a SQL query to list all customers with their corresponding cities and states. The list should be sorted in ascending numerical order by ZIP code, followed by customer name alphabetically. Take a screenshot of the Query Editor after you have executed this SQL command to show that it was completed successfully.

3. Construct and execute a SQL Query to list the Street, City, State, and Zip Code of all addresses that do not have a customer associated with them. Take a screenshot of the Query Editor after you have executed this SQL command to show that it was completed successfully.

4. Construct and execute a SQL query to count the number of customers in each state. The list should be ordered by the number of customers in descending order, then by zip code in ascending order. Take a screenshot of the Query Editor after you have executed this SQL command to show that it was completed successfully.

5. Construct and execute a SQL query to change Alice Harpers address to 320 21st St, Billing, MT 59101. Take a screenshot of the Query Editor after you have executed this SQL command to show that it was completed successfully.

6.Construct and execute a SQL query to list the full names of all customers who have Harper in their name. Take a screenshot of the Query Editor after you have executed this SQL command to show that it was completed successfully.

I need help writing the syntax in query editor to complete the steps in this assignment using SQL Server Management Studio.

Book Information: MCSA Guide to Microsoft SQL Server 2012 Project 5-1:Creating Databases and Tables

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

Step: 3

blur-text-image

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

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

Question Can any type of stock or securities be used in an ESOP?

Answered: 1 week ago