0% found this document useful (0 votes)
19 views

Queries On Employee Database

hdgsdhgdshdgggf

Uploaded by

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

Queries On Employee Database

hdgsdhgdshdgggf

Uploaded by

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

1.

calculate average salary of all employees list in table empl

select avg(sal) "AverageSalary" from empl;

2. Count number of records in table empl

select count(*) "TotalEmp" from empl;

14

3. Count number of Jobs in table empl

select count(job) "Job Count" from empl;

14

4. select distinct jobs are listed in table emp

select count (distinct job) "Unique Jobs" from empl;

5. Display maximum salary from table emp

select max(sal) "Maximum salary" from empl;

6. display minimum salary from table emp

select min(sal) "Maximum salary" from empl;

7. Display the joining date of seniormost employee

select min(hiredate) "Minimum Hire Date" from emp;

8. Display total salary of all employees listed in emp table

select sum(sal) "Total Salary" from empl;

9. Calculate total gross for employees of grade E2

select sum(gross) from empl


where grade="E2";

10. Display the average gross salary of employees with grades 'E1' or 'E2'

select avg(gross) from empl


where (grade='E1' or grade='E2')

11. Distinct city

select count(Distinct city) from empl;

You might also like