You are on page 1of 2

SQL & PL/SQL Skills Assessment

Duration : 120 minutes

SQL

Max Marks : 30

Each problem is of 10 marks.

Problem 1.

Write a query that will print for each employee, employee_id , employee’s full name that will be
concatenation of employee’s first name and last name separated by a space, contact no,

and in case contact no is missing employee’s email address.

The column heading for the second column should be ‘Full_Name’ and that of the last column
‘Contact_no/Email’.

Problem 2

Write a query to print country name wise, city wise total number of employees working for the
Organization. If a country or a city doesn’t have any employee then also the country and the city
name should be printed. In such as case it should print ‘No Employee’ for employee count.

The heading for the 3rd column should be ‘No_Of_Employees’.

Problem 3.

Write a query to print the detail of each employee who is drawing the highest salary from his or her
department.
PL/SQL

Max Marks : 70

4.

Create a PL/SQL package that should contain 2 procedures and 1 function. [10]

The first procedure whose access should be private should be receiving job_title as input parameter

and should be returning employee_id, first_name, hire_date and salary of all the employees

with the job_title.

The second procedure which should be public should be calling the first procedure with a job_title

and should print the employees details that it receives from the called procedure.

The 3rd member which also should be public should be a function that should be printing the initials
of each employee on first_name and last_name.

Provide implementation for this package [20 + 20 +10 ]

Finally test these procedures and functions to ensure that they are giving the output as expected.
[10]

You might also like