pl/sql coding

Database Management System
(QUERY FOR PAYROLL TABLE)
MALL MANAGEMENT APPLICATION

1.Select * from payroll;
2.select * from payroll where emp_id=20;
3.select count(*) from payroll;
4.select max(total_salary) from payroll;
5.select * from payroll where sal>(select min(sal) from payroll);
6.select * from payroll where emp_id=10 and emp_department=’system’;
7.select * from payroll where No_of_working>=ANY (select emp_id from payroll group by emp_id)
8.select * from payroll where (no_of_working,total_salary) in (select no_of_working,total_salary where basic_salary>13000)
9.select * from payroll where exists (select emp_id from payroll emp_id=30);
10.select sum(total_salary),emp_id from payroll group by emp_id;
11.select distinct emp_department from payroll;
12 select count(emp_department) , emp_department from payroll
Group by emp_department order by emp_department desc
13.select max(total_salary) as “Maximum salary” ,avg(salary) as “average salary” , sum(salary), emp_department From payroll group by emp_department
14.select max(total_salary) as “Maximum salary” ,avg(salary) as “average salary” , sum(salary), emp_department From payroll group by emp_department having sum(total_salary) > 10,000
15.select * from payroll where emp_name like ‘s%’

Comments

Popular Posts