Documente Academic
Documente Profesional
Documente Cultură
TABLE – EMPLOYEE
TABLE – JOB
1. Display all the employees whose native place is “Mumbai” in the descending
order of their hobby.
2. Print the name, basic, allowance and the net salary for these employee where
the name start with A, where net salary is calculated as basic+allowance.
3. Give the total salary spent for the male and female employees.
Sex Basic+Allowance
F 29200
M 40800
4. Display the name, nativeplace and date of birth of the eldest employee in the
organization.
Select name, nativeplace, dob from employee where dob= Select min(date)
from employee;
7. Display the number of employees department wise, if the basic salary of that
department’s employees are more than 10000.
Select count(*), dept from job group by dept having sum(basic)>10000;
Count(*) Dept
2 Finance
2 Hr
2 Marketing
3 Sales
8.Find the appointment date of the first employee, the retirement date of the last
employee and the number of records of every departments where the basic
salary is more than 8000.
Select dept, min(aptdate),max(retdate),count(*) from job where
basic>8000 group by dept;
10.Create a view named V1 which contains name, dob, hobby from the table
Employee.
Count(*) Dept
2 Finance
2 Hr
2 Marketing
3 Sales
3. Select name, sno, basic from employee, job where eno=sno and basic
between 5000 and 10000;