You are on page 1of 4

Simple Questions:

Problem #1:
Write a query to Display employee id,employee name,email_id for employees who are
contractors.
But the details should be in a sorted order of employee name.

Problem #2:
Write a query to display employee id, e-mail for Permanent employees who have
taken casual leave.

Problem#3:
Write a query to display employee id, employee name for the employee who have the
same designation as that of Ajay. Dont include Ajays detail.

Problem # 4:
Write a query to display the employee id,employee name,email_id,contact number
where date of joining
Year is after 2011.

Problem # 5:
Write a query to Display the employee id,vertical,employee name in sorted order of
vertical and within vertical sort on name.

Problem # 6:
Write a query to display the employee id and number of projects they have done
with alias name as Number_Of_Projects_Done.

Problem # 7:
Write a query to display the different types of leaves along with their total
count taken by the employee 120002 and give the count an alias name of
Leave_Availed.

Problem # 8:
Write a query to Display the employee id ,employee name,project_id,project shift
who are working on night shift.

Problem # 9:
Write a query to display the employee id ,leave description, start date, end date
and number of days leave taken for each leave applied and give it an alias name
of Number _Of_ Days.
Average Questions:

Problem#1:
Write a query to display employee name,manager name and the count of project the
employee has done.
Give manager name an alias name of Name_Of_Manager and count of project as
Count_Of_Project

Problem # 2:
Write a query to display the employee id, employee name, vertical who are getting
basic less then the average basic in the same vertical.

Problem # 3:
Write a query to Display the trend of leave being taken by the employees i.e the
month on which maximum employee took leave to the month on which lesser leaves were
taken and give the count an alias name of counting.

Problem # 4:
Write a query to display employee_id,employee_name, project_id,
date_of_joining,date of retirement(60 years after date of joining) and give the
alias name as date_of_retirement for the employee whose
Year of retirement is after 2070.

Problem # 5:
Write a query to display the employees who wont be able to complete there project
because of their retirement after 60 years from the date of joining.

Problem # 6:
Write a query to display employee id, employee name,designation ,basic and bonus.
Bonus will be given depending on designation. If the Manager then bonus of
10000,Devlpr then the bonus of 5000 and for Trainee it 500. Give the alias name as
Bonus.

Problem # 7:
Write a query to display the employee id who have done the maximum projects. Give
the counting the alias name of count.

Problem # 8:
Write a query to display the employee name, date of joining, vertical of any
employee in the same vertical as of Ajay. Exclude Ajay. Display the details in
sorted order of date of joining.
Problem # 9:
Write a query to count the number of employees working with the project name
banking and various types of within it like Maintenance, Support and System. Give
the alias name of counting the employee as count. Display the records is sorted
order. Display the records where we have more to the display where we have less
employees.

Problem # 10:

Write a query to display the employee name of the employees who are into projects
whose duration is not known.

Complex Questions:
Problem # 1:
Write a query to show the project id, project name,project type number of employees
working in that project. Give the count an alias name as Number_Of_Employees. The
project_id which is not assigned should show a value of 0 count for number of
employees. Display the list in sorted order. The project where the number of
employees are more should be shown first followed by the project where we have
lesser number of employees.
For example the output will be similar to the way shown below.

project_id project_name project_type Number_Of_Employee


P00005 Banking Support 3
P00001 Payroll System Maintenance 2
P00006 Banking Testing 2
P00007 Health Care Maintenance 0

Problem #2:
Write a query to display the employee name, date of joining, vertical, project
name, project type, project shift of any employee in the same vertical as of Ajay.
Exclude Ajay. Display the details in sorted order of date of joining.
For example the output will be similar to the way shown below.

employee_name date_of_joining vertical project_name project_type


project_shift
Ajad 2006-03-01 BFS Banking Support night
Jeet 2012-06-16 BFS Banking Maintenance morning

Problem#3:

Write a query to count the number of employees working with the project name
banking and various types of within it like Maintenance, Support and System. Give
the alias name of counting the employee as count. Display the records in sorted
order. Display where we have more employees to where we have less employees.
For example the output will be similar to the way shown below.
project_type count
Support 4
Testing 2
Maintenance 1

Problem # 4:
Write a query to display the employee id, employee name , number of leaves availed
for the employee
Who has taken maximum leaves. Give the alias name for leave availed as
Leave_Availed
For example the output will be similar to the way shown below. That means Rahul has
availed maximum number of leaves.

employee_id Employee_name Leave_Availed


120002 Rahul 10

Problem # 5:
Write a query to display the employee id, employee name , number of leaves availed
for the employee
Who has taken minimum leaves. Give the alias name for leave availed as
Leave_Availed
For example the output will be similar to the way shown below. That means Rahul has
availed maximum number of leaves.
For example the output will be similar to the way shown below. That means Rahul has
availed minimum number of leaves.

employee_id Employee_name Leave_Availed


120003 Amit 3

You might also like