Preview

Mis562 Week 2

Satisfactory Essays
Open Document
Open Document
2131 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Mis562 Week 2
MIS562 Week 2 Assignment

Homework week 2

Part 1

1. SQL> --1. List all employee information in department 30.
SQL> SELECT * FROM EMP WHERE DEPTNO = 30;

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7900 JAMES CLERK 7698 03-DEC-81 950 30

6 rows selected.

SQL>

2. SQL> --2. List employees name, job, and salary that is a manager and has a salary > $1,000
SQL>
SQL> SELECT ENAME, JOB, SAL FROM EMP 2 WHERE EMPNO IN 3 (SELECT e.MGR FROM EMP e WHERE e.MGR IS NOT NULL) 4 AND SAL > 1000;

ENAME JOB SAL
---------- --------- ----------
FORD ANALYST 3000
BLAKE MANAGER 2850
KING PRESIDENT 5000
JONES MANAGER 2975
SCOTT ANALYST 3000
CLARK MANAGER 2450

6 rows selected.

SQL>

3. SQL> --3. Repeat exercise 2 for any employee that is not a manager or earns a salary > $1,000
SQL> SELECT ENAME, JOB, SAL FROM EMP WHERE EMPNO NOT IN (SELECT MGR FROM EMP WHERE MGR IS NOT NULL) OR SAL > 1000;

ENAME JOB SAL
---------- --------- ----------
SMITH CLERK 800
ALLEN SALESMAN 1600
WARD SALESMAN 1250
JONES MANAGER 2975
MARTIN SALESMAN 1250
BLAKE MANAGER 2850
CLARK MANAGER

You May Also Find These Documents Helpful

  • Good Essays

    Mis589 Week 2 You Decide

    • 796 Words
    • 4 Pages

    After conducting interviews with the key stakeholders at the Leonard Cooper Charter School, we have identified several issues with the current network that need to be addressed. According to Network Technician, Helen Ross printing is a problematic area. The school currently has over 50 networked printers in the building and they would like a way to consolidate the management of print jobs due to the queues of the printers often being filled.…

    • 796 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Nt1330 Unit 3 Quiz

    • 501 Words
    • 3 Pages

    Test for duplicate employees on the entire payroll file, using the employees' Social Insurance, Social Security or National Insurance Numbers as a unique employee identifier.…

    • 501 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Tm583 Week 6

    • 311 Words
    • 1 Page

    Google’s Motivation to bid into the wireless marketplace through the use of the 700MHz Spectrum Auction was the opportunity to develop possibly a 50 state network “The FCC is auctioning 1,099 wireless licenses in the 700 MHz band, but the most attractive spectrum for many bidders is the “C-block” of 12 regional licenses that may be combined to create a 50-state network.” (Reiter, 2008) This new product development would allow Google to become a cellular network operator. This market includes firms such as AT&T and Verizon, Google would not only compete with these firms but also would have had the opportunity to network with other entities to develop some innovative new products.…

    • 311 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    The Employee’s start date is 17 June 2013. The Employee’s primary place of work is 1234 Grump…

    • 713 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Hrm/531 Week 3

    • 516 Words
    • 3 Pages

    Comcast should focus on knowing our customer profitability. For example, Comcast and AT&T Broadband acquisitions are done for the customers, the buyers of Comcast saw a profit in obtaining more customers. Our executives must understand even at the local level that some customers are more profitable than others. Most time we are more focused on the products, such as home networking, CHSI speeds, ect. If we focus our attention on the demopgraphic, economical locations that have the higher profitability then we can geer our services towards those who will maximize our revenue.…

    • 516 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Hr593

    • 709 Words
    • 3 Pages

    Try to classify the employees based on exempt and non-exempt status based on FLSA regualtions. There is a whole list of exempt employees according to US department of labour and some of that list includes:…

    • 709 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    HRM 558 Week 2 DQ 2

    • 399 Words
    • 2 Pages

    This document of HRM 558 Week 2 Discussion Question 2 comprises: Why is it important for HR professionals to demonstrate proficiency in criteria selection and the use of criteria selection? Provide an example to explain your answer.…

    • 399 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Hrm/531 Week 3

    • 1180 Words
    • 5 Pages

    Consider the situation where you are working under contract for another organization. If you are given a set of project specifications (detailed requirements), to what degree should you attempt to understand the needs behind these requirements before or after starting the project?…

    • 1180 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Hrm/531 Week 2

    • 559 Words
    • 3 Pages

    Analyze your current work (or School) environment through the lens of the content in Chapter 2 and determine the most significant ethical issue and its impact on overall productivity and moral. Explain your rationale.…

    • 559 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Soc120 Week 3

    • 1213 Words
    • 5 Pages

    Advocates of the death penalty recognize that no system is perfect and that applying the death penalty runs a small risk of executing someone who is innocent. Is this a price society should be willing to pay?…

    • 1213 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    BIS 155 Final

    • 2158 Words
    • 9 Pages

    1. (TCO 1) You work for a local construction firm, "DeVry Engineering Group" and your supervisor wants to test your knowledge and skills with Microsoft Excel and has instructed you to develop a spreadsheet to calculate weekly payroll for “15” employees with the following assumptions:…

    • 2158 Words
    • 9 Pages
    Good Essays
  • Good Essays

    Building a Pay Structure

    • 856 Words
    • 4 Pages

    CEO position is also excluded). Our method for doing so follows the "Pay Structure" outline. Job evaluation…

    • 856 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    employees belonging to Class II, Class III and Class IV, the Zonal Manager in-charge of the…

    • 15891 Words
    • 87 Pages
    Powerful Essays
  • Good Essays

    Service Conditions of Sbi

    • 3271 Words
    • 14 Pages

    Page | 2 SALARY, ALLOWANCES & OTHER PROVISIONS .............................................................................3 Reimbursements.............................................................................................................................5 LEAVE RULES...................................................................................................................................6 EMPLOYEE LOAN SCHEMES ............................................................................................................9 EMPLOYEE WELFARE SCHEMES ...................................................................................................11 LINKS .............................................................................................................................................12…

    • 3271 Words
    • 14 Pages
    Good Essays
  • Good Essays

    Pl/Sql Programs

    • 1293 Words
    • 6 Pages

    16. Write a Pl/Sql program to raise the employee salary by 30%, who have completed their 40 years of service. declare cursor c3 is select * from emp where extract(year from sysdate)-extract(year from hiredate)>40 for update; e emp%rowtype; begin open c3; loop fetch c3 into e; exit when c3%notfound; update emp set sal=e.sal+(30/100)*e.sal where current of c3; end loop; close c3; end; / 17. Write a Pl/Sql program to check the given number is Armstrong ‘or’ not. declare n number(3); s number(3):=0; t number(3); begin n:=&n; t:=n; while t>0 loop s:=s+power((t mod 10),3); t:=trunc(t/10); end loop; if(s=n) then dbms_output.put_line('The given number ' || n || 'is an armstrong number'); else dbms_output.put_line('The given number ' || n || 'is not an armstrong number'); end if; end; / 18. Write a Pl/Sql program to display top 10 rows in emp table based on their job and salary. declare cursor c1 is select * from emp order by sal desc; e emp%rowtype; begin…

    • 1293 Words
    • 6 Pages
    Good Essays