You are on page 1of 24

Question Instructions

Please follow instructions given


below.
Use below Alias for the table
1 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
2 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
3 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d
Please follow instructions given
below.
Use below Alias for the table
4 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
5 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
6 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d
Please follow instructions given
7 below.
Important Note :
1. Don't Use Alias Names for the
tables.
2. Use Alias Names for the tables.

Please follow instructions given


below.
Use below Alias for the table
8 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
9 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d
Please follow instructions given
below.
Use below Alias for the table
10 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
11 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
12 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d
Please follow instructions given
below.
Use below Alias for the table
13 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
14 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
15 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d
Please follow instructions given
below.
Use below Alias for the table
16 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
17 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
18 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d
Please follow instructions given
below.
Use below Alias for the table
19 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
20 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
21 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d
Please follow instructions given
below.
Use below Alias for the table
22 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d

Please follow instructions given


below.
Use below Alias for the table
23 joins.
Employee - e
Salary - s
Leave - l
Employee_Leave - el
PayRoll - p
Department d
Question Text

Write a query to display Employee ID, Employee Name, Department ID


and Department Name of all employees who has a department assigned.

Write a query to display the Employee ID, Employee Name, Basic Pay of all employees who are in employee category 'A'

Write a query to display the Employee ID, Employee Name, Department ID


and Department Name of all employees who has a department assigned and department location is CHENNAI.
Write a query to display the employee ID and employee name of the employees who have not been assigned a department ye

Write a query to display the employee ID, employee name and joining date of the employees who joined before 2005.

Write a query to display the employee ID, employee name and joining date
of the employees who joined between Jan 1 2005 and Dec 31st 2010
Write a query to display the employee ID, employee name and joining date
of the employees who joined in MARCH.

Write a query to display all employee names which begins with 'R'.

Display the first five employees name,joining date in the employee table in the order of date of joining . Ignore employees wh
Write a query to display the EmployeeID, Employee Name,Net Pay of an employee whose ID is "E001" for the month of APRIL

Write a query to display the department id and no of employees in each department sorted by department id. (Exclude depart

Write a query to display the EmployeeID, Employee Name and the total number of leaves each employee has taken with Tota
Hint: For Example, if employee E001 has taken 2 days leave on January and 3 days leave of February then his total number of
Write a query to display employee id, employee name of all employees who doesn't have LOP amount for the month of APR an

Write a query to display employee name, professional tax, netpay of employees with employee category 'A'

Write a query to display employee id, employee name,department id who are having netpay in the range 10000 - 20000
Write a query to display employee names whose total deduction is more than 2000 for the month of APRIL.

Write a query to display employee id, employee name, department id, department name of all employees regardless of wheth

Write a query to display Employee ID, Employee Name, Department ID, Years of Experience and Employee Category of the emp
Hint: Use the total_leaves column to check the leave condition for more than ten days.
Write a query to display employee id, employee name and remaining casual leaves (alias- RemainingLeaves) for the employee
Hint: CL Causal leave.
EMPLOYEE table has Employees leave Category. For example employee E001 belong to X leave category.
EMPLOYEE_LEAVE table has details of number of leaves the employees has availed. For example, E001 has availed totally 8 d
LEAVE table has the Leave Category and number of CL, EL and ML available for the category. For example, E001 has category
So, E001s remaining leave would be 10 days. Similarly calculate for E002.

Write a query to display employee id, employee name and total number of leaves he can take (hint: with EligibleLeave as alia
Hint:
Employee table has Employees leave Category. For example employee E001 belong to X leave category.
Employee_Leave table has the Leave Category and number of CL, EL and ML available for them. For example, Employee E001 b
So, E001s eligible leave would be 33 days which is sum of all his leaves. Similarly calculate for all employees.

Write a Query to display employee id, employee name, department id, department name, net pay of all employees who have d
Hint: For example if there are 10 employees where 3 employees have got a salary of 1000 which is the highest salary of the em
Write a query to display employee id, employee name, basic pay and tax percentage for all employees. Use TaxPercentage as

Write a query to display employee name,employee category and basic pay for all employees based on the following criteria: (E
Hint: Use salary as alias for the basic pay field.
For example, if there are 3 employees with one having category A and other having category D and other category C. Then t
Difficulty Level

1
1

1
1

1
2

2
2

2
2

2
3

3
3

You might also like