Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. For employees with salary greater than 15000 an 10% increment has been announced by the company, write a query that increments the salaries for

1. For employees with salary greater than 15000 an 10% increment has been announced by the company, write a query that increments the salaries for these employees. Name this column as Updated Salary

2. Show employees for which there is no manager assigned to them.

3. Show all data in the employee table but concatenate the first and last name in a single column. Do not show the first and last name as separate columns. The column name should be name for the concatenated names. Make sure you add a space between the first and last name.

4. Add another column named days worked and calculate the number of days an employee has worked since the hire date.

5. Show first_name , last_name and email of those employees whose first_name start with leNer d and their salaries are lesser then 10000.

6. Show first_name , last_name, email and phone_number of those employees whose last_name ends with leNer a and their phone_number contains digit 9

# USE THE EMP AND DEPT DATA FOR THIS QUESTION. USE SQL.

image text in transcribedimage text in transcribed

Emp: EMPNO ENAME JOB MGR HIRE DATE COMM DEPTNO 300 500 1400 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7664 MARTIN 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 7876 ADAMS 7900 JAMES 7902 FORD 7934 MILLER CLERK SALESMAN SALESMAN MANAGER SALESMAN MANAGER MANAGER ANALYST PRESIDENT SALESMAN CLERK CLERK ANALYST CLERK 7902 17-DEC-80 7698 20 FEB 1 7698 22-FEB-81 739 02-APR-81 7698 20-SEP-B1 783901-MAY-81 7839 09-JUN-81 7566 09-DEC-12 17-NOV-81 7698 08-SEP-81 7788 12 JAN 23 7698 03-DEC-81 7566 03-DEC-81 7742 23 JAN 2 20 30 30 20 30 30 10 20 10 30 20 30 20 10 SAL 800 1600 1250 2975 1250 2850 2450 3000 5000 1500 1100 950 3000 1300 SAL 800 1600 1250 2975 1250 2850 2450 3000 5000 1500 1100 950 3000 1300 EMPNO ENAME JOB MGR HIREDATE COMM DEPTNO 300 500 1400 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7664 MARTIN 7598 BLAKE 7782 CLARK 7708 SCOTT 7839 KING 7844 TURNER 7876 ADAMS 7900 JAMES 7902 FORD 7904 MILLER CLERK SALESMAN SALESMAN MANAGER SALESMAN MANAGER MANAGER ANALYST PRESIDENT SALESMAN CLERK CLERK ANALYST CLERK 7902 17-DEC-80 7698 20 FEB 1 7698 22-FEB-81 7839 02-APR-B1 7698 20-SEP-01 7839 01-MAY-81 7839 09-JUN-81 7566 09-DEC-2 17-NOV-81 7698 08-SEP-81 7788 12 JAN 3 7698 03-DEC-B1 7566 03-DEC-81 770223 JAN 2 20 30 30 20 30 30 10 20 10 30 20 30 20 10 Dept: DEPTNO DNAME LOC 10 ACCOUNTING 20 RESEARCH 30 SALES 40 OPERATIONS 10 ACCOUNTING 2D RESEARCH 30 SALES 40 OPERATIONS NEW YORK DALLAS CHICAGO BOSTON NEW YORK DALLAS CHICAGO BOSTON

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions

Question

what does marxist think about exploting poor countries

Answered: 1 week ago