Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the database for a company named Wedgewood Pacific Corporation (WPC) that contains data about company employees, department, projects, company assets, and other aspects of

Consider the database for a company named Wedgewood Pacific Corporation (WPC) that contains data about company employees, department, projects, company assets, and other aspects of company operations. For the following questions, two tables will be considered as provided below:

DEPARTMENT (DepartmentName, BudgetCode, OfficeNumber, Phone)

EMPLOYEE( EmployeeNumber, FirstName, LastName, Department, Phone, Email)

Dapartment Table:

Employee Table:

Using above tables, create SQL queries to answer the following questions: (10 marks)

a. Identify primary and foreign keys for both tables.

b. Write insert statements to enter last two records into Department table as shown in above figure.

c. Display details of all employees who work in Accounting department. Sort the results in descending order of employee last name.

d. Display BudgetCode and OfficeNumber of the department where the employee named Heather works.

e. How many employees work in Administration department?

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions