Database Assignment Part 1 – Worksheet:
Overall Instructions: Thisdatabase assignment consists of two parts.
This worksheet includes the instructions to complete Part 1 of the assignment. Read and follow it carefully. Complete it in its entirety.
Review the structure and data in the Company database. Identify andrecord the primary keys, foreign keys (if any), and the total number of recordsfor each table in the database, adding rows as neededhere to accommodate them.The first table is completed for you.
| Table | Primary Key | Foreign Key(s) | Number of Records |
| Category | CategoryID | None | 31 |
STEP 2: Draw a relationship view of the database
Based on your findings in Step 1, generate a figure showing the relationships among the tables in the Company database.
Query 1: Develop a query that will produce an employee list of all employees who no longer work at the Company. Include their last name and first name, their job title, their city, and sort the output by city.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| Enter the name of the city for the employee who is 4th on the output list here:
|
| Compare the number of records in the output of your query to the number of records in the Employee table. Using complete sentences, explain what yourcomparison reveals (are they the same or not?). Enter your answer here:
|
Query 2: Develop another query that includes the employees who currently work at the Company and are in the USA. Include their last name and first name, their job title, their hire date, and sort the output by their title.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| Find Alfred Waters in the query output. Enter his numeric position (1, 2, 3, etc.) on the list here:
|
| Compare the number of records in the output of your query to the number of records in the Employee table. Using complete sentences, explain what your comparison reveals (are they the same or not?). Enter your answer here:
|
Query 3: Develop a query to produce output that lists customers and includes their last and first names, their region, and the country where they live. Include on the list only customers who do not live in the USA and who have a last name that starts with S. Sort the output by country, then by last name.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| What is the full name and country of the 10th record in the output? Enter your answer here:
|
Query 4: Develop a query that will produce a list of products. Include in the output the category ID, the product name, units in stock, and units on order. Restrict the output to include only products that are in the categories with ID number 10, 11, and 12. Sort the query by the category ID and then by the product name.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| What is the name of the product that is the 15th on the output list? Enter your answer here:
|
Query 5: The Sales department wants to know how many customer orders were placed during the months of February and March in the year 2013. They want the list to show the employee ID who processed the order and then the number of orders processed by that employee, and name that column as “Order Count”.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| What is the quantity shown in the Order Count column for the employee identified by employee ID 6? Enter your answer here:
|
Query 6: The Sales department wants a list that will identify the product with the largest gross sales over all sales. They want the output to include the product name and its total gross sales amount (sales before discount) named as “Gross Sale.” Sort the query output in descending order by the gross sale, then by the product name.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| What is the name of the product that is the 24th on the list and what is the Gross Sale amount for it? Enter your answer here:
|
Query 7: The Sales department wants to know the total quantity of products on each customer order. The output needs to include the order ID, the last name, city, and country of the customer, and then the total quantities ordered, named as “Products Ordered.” Sort the query output in descending order by the number of products ordered, then by the customer country.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| On the first record in the output, list the last name, country, and the number of products ordered. Enter your answer here:
|
Query 8 & Report: Create a new Word document, and name it as LastFirst_Customer where Last is your last name and first is your first name. Continue to create a report by following these next steps.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| What is the last name of the 5th record in the in the output? Enter your answer here:
|
Query 9& Report: Create a new Excel document, and name it as LastFirst_GrossSale where Last is your last name and first is your first name. Continue to create a report by following these next steps.
| Copy your query’s SQL syntax and paste it here:
|
| How many records are listed inthe query output? Enter your answer here:
|
| What is the name of the last product listed? Enter your answer here:
|
Our Advantages
Plagiarism Free Papers
All our papers are original and written from scratch. We will email you a plagiarism report alongside your completed paper once done.
Free Revisions
All papers are submitted ahead of time. We do this to allow you time to point out any area you would need revision on, and help you for free.
Title-page
A title page preceeds all your paper content. Here, you put all your personal information and this we give out for free.
Bibliography
Without a reference/bibliography page, any academic paper is incomplete and doesnt qualify for grading. We also offer this for free.
Originality & Security
At Homework Valley, we take confidentiality seriously and all your personal information is stored safely and do not share it with third parties for any reasons whatsoever. Our work is original and we send plagiarism reports alongside every paper.
24/7 Customer Support
Our agents are online 24/7. Feel free to contact us through email or talk to our live agents.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
We work around the clock to see best customer experience.
Pricing
Our prices are pocket friendly and you can do partial payments. When that is not enough, we have a free enquiry service.
Communication
Admission help & Client-Writer Contact
When you need to elaborate something further to your writer, we provide that button.
Deadlines
Paper Submission
We take deadlines seriously and our papers are submitted ahead of time. We are happy to assist you in case of any adjustments needed.
Reviews
Customer Feedback
Your feedback, good or bad is of great concern to us and we take it very seriously. We are, therefore, constantly adjusting our policies to ensure best customer/writer experience.