Skip to main content

INF503 Week 3 (7.8 lab)

 

7. LAB

7.1.

SELECT DISTINCT Pnumber, Pname
FROM PROJECT
WHERE  Pnumber IN
(SELECT Pnumber
FROM PROJECT, EMPLOYEE_DEPARTMENT, EMPLOYEE_REC
WHERE Dnum = Dnumber AND
Mgr_ssn = Super_ssn AND Lname = 'Zelaya')
OR
Pnumber IN
(SELECT Pno
FROM WORKS_ON, EMPLOYEE_REC
WHERE Essn = Ssn AND Lname = 'Smith');

 

7.2

SELECT Lname, Fname
FROM EMPLOYEE_REC
WHERE Salary > (SELECT MAX (Salary)
FROM EMPLOYEE_REC
WHERE Dno = 5);

 

7.3

SELECT E.Lname AS Employee_name,
S.Lname AS Supervisor_name
FROM (EMPLOYEE_REC AS E LEFT OUTER JOIN EMPLOYEE_REC AS S
ON E.Super_ssn = S.Ssn);

 

7.4

SELECT SUM (Salary), MAX (Salary), MIN (Salary), AVG (Salary)
FROM (EMPLOYEE_REC JOIN EMPLOYEE_DEPARTMENT ON Dno = Dnumber)
WHERE Dname = 'Research';

 

7.5

SELECT COUNT (*)
FROM EMPLOYEE_REC;

 

7.6

SELECT Pnumber, Pname, COUNT (*)
FROM PROJECT, WORKS_ON
WHERE Pnumber = Pno
GROUP BY Pnumber, Pname
HAVING COUNT (*) > 1;

 

7.7

UPDATE EMPLOYEE_REC
SET Salary =
CASE WHEN Dno = 5 THEN Salary + 2000
WHEN Dno = 4 THEN Salary + 1500
WHEN Dno = 1 THEN Salary + 3000
ELSE Salary + 0;

 

7.8

CREATE ASSERTION SALARY_CONSTRAINT
CHECK (EXISTS (SELECT *
FROM EMPLOYEE_REC E,
EMPLOYEE_DEPARTMENT D
WHERE E.Salary > 25000
AND E.Dno = D.Dnumber
AND D.Mgr_ssn = E.Ssn));

 

7.9

CREATE VIEW WORKS_ON1
AS SELECT Fname, Lname, Pname, Hours
FROM EMPLOYEE_REC, PROJECT, WORKS_ON
WHERE Ssn = Essn AND Pno = Pnumber;

 

7.10

ALTER TABLE COMPANY.EMPLOYEE_REC ADD COLUMN Job VARCHAR(12);



8.LAB


8.1

SELECT DISTINCT Sex, Salary
FROM EMPLOYEE_REC;

 

8.2

SELECT City FROM EMP_CUSTOMERS
UNION
SELECT City FROM EMP_SUPPLIERS
ORDER BY City;

 

8.3

SELECT *
FROM EMPLOYEE_REC
WHERE Dno = 4 AND Salary > 25000;


8.4









Comments

Popular posts from this blog

IS5203 Type 2 Post Assessment and Final Quiz

  Carlos has just created a new subnet for the finance department. He needs to be able to allow the employees in finance to retrieve files from the sales server, which is located in another subnet. Which of the following OSI model layers would it be necessary to categorize the device into? a. Layer 4 b. Layer 6 c. Layer 2 d. Layer 3 All of the cubicles in a company's office have cables that run up to the ceiling and across to an IDF. Inside the IDF, they connect directly to the latest generation switch available from the networking equipment vendor that they have chosen. Which of the following describes the physical topology most likely in use? a. mesh

GE5103-2 Project Management [Aug 23 Syllabus]

    Some of the advantages of using time boxes and cycles in project coordination efforts include creating urgency, measuring progress, and allowing for predictable measurements. A)        True 2.    Even though most project managers are not contract specialists, they need to understand the process well enough to coordinate with the team. For the current assignment, you are looking at a short-term and small effort with a contractor of just a few hours without significant clarity. Which of the following would be the most applicable contract to use in this situation? A)        Time and materials 3. The project you are working on has had modifications to the plan from the start and even how the project is run. Project governance covers all of the 3 following except: A)        Naming The project manager 4. Of the following, which is most likely a trigger condition defined early in the project? A) Alerting Governance board if 10 percent over schedule 5. Of the following options, which stand

GE5163 Week8 ( Final Exam ) Quize's

  A process or product that is insensitive to normal variation is referred to as being Select one: a. in specification b. capable c. robust d. out of control Feedback Your answer is correct. A completed failure mode and effects analysis (FMEA) results in the following assessment rating.      Occurrence = 4      Severity = 8      Detection = 10 What is the risk priority number (RPN) for this FMEA? Select one: a. 42 b. 22 c. 320 d. 120 Feedback Your answer is correct. In a visual inspection situation, one of the best ways to minimize deterioration of the quality level is to: Select one: a. have a program of frequent eye exams. b. retrain the inspector frequently. c. add variety to the task. d. have a standard to compare against as an element of the operation. Feedback Your answer is correct. Which of the following elements is least necessary to a good corrective action feedback report? Select one: a. What caused the failure b. Who caused the failure c. What correction has been made d. Wh