0% found this document useful (0 votes)
38 views

ORACLE Assignment

The document contains instructions for 11 queries to be written for an Oracle database course. The queries involve displaying dates, employee data like names, salaries with calculations, hire dates, and representing salary amounts with asterisks. The instructor's name is Sir Saqib and the student's name and roll number are provided.

Uploaded by

Maham Naqvi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

ORACLE Assignment

The document contains instructions for 11 queries to be written for an Oracle database course. The queries involve displaying dates, employee data like names, salaries with calculations, hire dates, and representing salary amounts with asterisks. The instructor's name is Sir Saqib and the student's name and roll number are provided.

Uploaded by

Maham Naqvi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Name: Tooba Batool

Roll no: BS-IT-M-19-15


Course title: oracle database
Course teacher: Sir Saqib

1. Write a query to display the current date.

2. Display the employee number, name, salary, and salary increase by 15% expressed as a
whole number. Label the column New Salary.

3. Modify your query p3q2.sql to add a column that will subtract the old salary from the new
salary. Label the column Increase. Rerun your query.
4.For each employee display the employee name and calculate the number of months between today
and the date the employee was hired. Label the column MONTHS_WORKED. Order your results by the
number of months employed. Round the number of months up to the closest whole number

5.Display the employee’s name, hire date, and salary review date, which is the first Monday after six
months of service. Label the column REVIEW. Format the dates to appear in the format similar to
“Sunday, the Seventh of September, 1981.”
6.Write a query that produces the following for each employee: <employee name> earns <salary>
monthly but wants <3 times salary>. Label the column Dream Salaries.

7.Create a query to display name and salary for all employees. Format the salary to be 15 characters
long, left-padded with $. Label the column SALARY.

8.Write a query that will display the employee’s name with the first letter capitalized and all other
letters lowercase and the length of their name, for all employees whose name starts with J, A, or M.
Give each column an appropriate label.

9.Display the name, hire date, and day of the week on which the employee started. Label
the column DAY. Order the results by the day of the week starting with Monday.
10.Create a query that will display the employee name and commission amount. If the employee does
not earn commission, put “No Commission.” Label the column COMM.

11.Create a query that displays the employees’ names and indicates the amounts of their salaries
through asterisks. Each asterisk signifies a hundred dollars. Sort the data in descending order of
salary. Label the column EMPLOYEE_AND_THEIR_SALARIES.

You might also like