User Tools

Site Tools


kurs:aggregat_summenfunktionen
/*select first_name, last_name, trunc(salary*1.276711235) from employees

select sum(salary), 
       min(salary),
       max(salary),
       avg(salary),
       median(salary),
       stddev(salary)
        from employees
                      
  */    
-- desc employees

select count(department_id) from employees;
 


select avg(commission_pct), 
       sum(commission_pct), 
       count(commission_pct), 
       count(*),
       sum(commission_pct)/count(*)  from employees

select         
        department_name,
        trunc(avg(salary)),
        sum(salary) susa
   from employees e join departments d on 
        d.department_id = e.department_id
   group by         
        department_name 
--   having sum(salary) > 20000      
   order by susa

select 12 + null from dual;
kurs/aggregat_summenfunktionen.txt · Last modified: 2014/09/10 21:22 (external edit)