Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This exercise is based on the tables shown in the figure from the Adventure Works2008 database. These tables can be found on the SQL server

image text in transcribedimage text in transcribed

This exercise is based on the tables shown in the figure from the Adventure Works2008 database. These tables can be found on the SQL server via remote desktop. Department (Huma 9 DepartmentID Name GroupName ModifiedDate EmployeeDepartment History (Hu 9 BusinessEnttyID DepartmentID ShiftID StartDate EndDate ModifiedDate 8 EmployeePay History o Employee (HumanResources) BusinessEntityID Business EntityID RateChangeDate NationalIDNumber Rate LoginID PayFrequency OrganizationNode ModifiedDate OrganizationLevel Job Title BirthDate Marital Status Gender HireDate Please write the SQL statements to answer the following questions. 8. Create the following string for each department: Engineering has 6 employees" 1 2 3 4 5 (No column name) Engineering has 6 employees Tool Design has 4 employees Sales has 18 employees Marketing has 9 employees Purchasing has 12 employees Research and Development has 4 employees Production has 179 employees Production Control has 6 employees Human Resources has 6 employees Finance has 10 employees 6 7 8 9 10 9. Google and learn about the SQL function "Case...When...End". Use this function to show the number of female, male, and total number of current employees Female Male Total 84 206 290 1

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

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

Students also viewed these Databases questions

Question

1. Identify outcomes (e.g., quality, accidents).

Answered: 1 week ago