Purchase Solution

SQL Server Database

Not what you're looking for?

Ask Custom Question

SQL Server database for Kudler Fine Foods/Service Request SR-kf-009

Create the following two tables using the following fields:

Note: Supply the appropriate SQL Server data types when creating the tables. In the Employee table, create an Employee ID field that will generate a unique number for each employee and designate the field as the Primary Key. In the Job Title table, you will need to either utilize one of the listed fields as the table's primary key or you will need to create an additional field to use as the primary key. The primary key from the Job Title table will appear as the foreign key in the Employee table.

· Employee

§ Emp_ID

§ Last_name

§ First_name

§ Address

§ City

§ State

§ Telephone_area_code

§ Telephone_number

§ EEO-1 Classification

§ Hire_date

§ Salary

§ Gender

§ Age

§ Foreign Key from Job Title table

· Job_title

§ EEO-1 Classification

§ Job_title

§ Job description

§ Exempt / Non-Exempt Status

Using the SQL INSERT statement:

· Go to the Human Resources department in the Kudler Fine Foods intranet. Using information found in the Employee Files for the La Jolla and Encinitas stores, enter records into the employee table for the following employees:

§ Glenn Edelman

§ Eric McMullen

§ Raj Slentz

§ Erin Broun

§ Donald Carpenter

§ David Esquivez

§ Nancy Sharp

· Using the Kudler Fine Foods Job Classifications and Job Descriptions information, enter records into the job_title table for the following job titles:

§ Accounting Clerk

§ Asst. Manager

§ Bagger

§ Cashier

§ Computer Support Specialist

§ Director of Finance & Accounting

§ Retail Asst. Bakery & Pastry

§ Retail Asst. Butchers and Seafood Specialists

§ Stocker

Non-Exempt employees at Kudler Fine Foods are paid an hourly wage and are required to track their working hours.

Check the results by selecting all of the columns from both of your tables.

Using the database and tables from Week Two, write SQL statements and enter the records into the employee table for the workers identified in the Employee Files for the administrative offices and the Del Mar location. Check the results by selecting all of the columns from both of your tables

You will use the database you created in week 1 and will add these scripts to the database.

Project Description
Query 1 (SELECT LIKE):
Write a SQL query that joins two tables Employee and JobTitle. Use LIKE to restrict record selection. (Use age column to restrict data. I will leave it up to you to select the restricting age.)

Query 2 (SELECT BETWEEN):
Write a SQL statement that does an INNER JOIN the two tables Employee and JobTitle with the result displaying the Employee full name, EEO Classification, job description and salary. You will use the BETWEEN qualifier to join only records where the Employee salary is between $20,000 and $35,000. You will order the list by employee's last name.

Query 3 (SELECT INTO and SELECT UNION):
First write a SELECT INTO query to create a table employee_ca. What you will be doing is selecting all fields for every record where the employee is from a specific state. I used California as my state in the sample query. Make a table appropriate to the state in your current employee data

Then write a statement that uses the UNION ALL statement to select records from the employee table and all records from the employee_ca table you created above. Notice that the query displays all duplicate records.

Query 4 (SELECT GROUPORDER):
Write a SQL statement that displays the average salary of employees by EEO Classification. You only need to display the EEO Classification and the average salary. No invalid EEO Classifications should be displayed

Query 5 (SELECT DISTINCT):
Create a SELECT query that will display the number of different (distinct) states employees are in and the actual number of employees in each of the states. This means you need to use the DISTINCT and COUNT commands

Query 6 (UPDATE DATA):

Choose an EEO-1 Classification - then write a query that increases all employees' salaries that have that classification by 10%. This means you need to use the UPDATE command.

Query 7 (DELETE EMPLOYEE):

Choose an employee from the employee table - then write a query that deletes this employee. This means you need to use the DELETE command.

Query 8 (SELECT SUBQUERY):

Write a SELECT query that utilizes a SUBQUERY to determine if the EEO-Classification for an employee is invalid. This means that you need to use the NOT EXIST for the SUBQUERY.

Query 9 (SELECT-SUM-COUNT):

Create a SELECT statement that displays the Title, Number of Employees and Total salary paid to all employees for the specific Title. You need to COUNT the employees and SUM the salary. The resultant output should look like:

Query 10 (SELECT MIN-MAX):

Write a SELECT statement that displays the employee's average salary, employee's minimum salary, employee's maximum salary by title by state.

Purchase this Solution

Solution Summary

SQL statements are created for the Kudler Fine Foods/Service request SR-kf-009. The response received a '5/5' rating from the student who originally posted the question.

Purchase this Solution


Free BrainMass Quizzes
Basic Networking Questions

This quiz consists of some basic networking questions.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.