0% found this document useful (0 votes)
18 views1 page

Lab Task - 2 - MT

Uploaded by

tarekms008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Lab Task - 2 - MT

Uploaded by

tarekms008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Lab Task 2 [MT]

Instructions:
• Complete the given tasks (Problems) using Oracle 10g.
• After completing all the tasks, then you need to take the screenshots of your queries and
outputs (follow the sequence 1 to 10).
• Open a word file and write your name, id and section first. Then, insert all the pictures in
a word file sequentially.
• Now, Convert the word file to the pdf file. You must use your id to save the PDF.
• Example: 23_*****_2_Task2.pdf
• Upload the PDF file in the MS teams “Lab Task 2” section. Then click on “Turn in”.
• Submission deadline: Nov 23, 2024 [Time: 8:00 pm].
• Complete the tasks in a timely manner.
Execute the following Queries by SQL COMMANDS:
1. Write a query to display the current date. Label the column 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 previous query to add a column that will subtract the old salary from
the new salary. Label the column Increase. Rerun your query.
4. 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 like “Sunday, the Seventh of September 1981.”
5. For each employee display the employee’s 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.
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. 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.
8. Create a query that will display the employee’s name and commission amount. If the
employee does not earn commission, put “No Commission.” Label the column
COMM.
9. 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.
10. Display the hiredate in a reverse order.

Prepared by: Jubayer Ahamed

You might also like