Purchase Solution

SQL statements

Not what you're looking for?

Ask Custom Question

I am seeking help with solving several SQL statements. I am specifically looking for the code that goes with these problems.

**First Problem**

Table: Employee (for problems #1 and #2)

EmpID Dept Salary HireDate SupervisorID
1001 Finance 10,000 11/1/98 1020
1002 Finance 15,000 12/12/96 1020
1020 Finance 30,000 2/9/96 1035
1015 Human Resources 20,000 3/15/01 1045
1008 Operations 9,000 8/22/97 1013
1010 Operations 12,000 7/9/01 1013
1035 Operations 40,000 9/14/95 1000
1007 Maintenance 5,000 10/7/01 1017
1050 Human Resources 10,000 4/5/98 1045
1000 Executive 60,000 11/25/93
1016 Human Resources 11,000 10/13/01 1045

Using table Employee, select the names and average salaries for all departments that satisfy the following condition:
- include all departments except HR
- average salaries > 10,000
- sort by department name

**Second Problem**

Employee table contains the following fields: ID, firstname, lastname, deptid, managerid, projectid.
Manager table contains the following fields: ID, firstname, lastname, projectID, startdate, enddate.
Department table the following fields: deptID, deptname.
Get all projects started after January 1, 2005 for the 'Operations" department and list the lastname of each employee involved in the project, their manager's lastname, and the start and end dates.

Purchase this Solution

Solution Summary

SQL statements are examined.

Solution Preview

Try the following. I could not test the code because I do not have SQL in my pc. If it does not work, you can repost and ask for refund. I ...

Purchase this Solution


Free BrainMass Quizzes
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.

C# variables and classes

This quiz contains questions about C# classes and variables.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

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 Networking Questions

This quiz consists of some basic networking questions.