User Tools

Site Tools


kurs:aggregat_summenfunktionen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:aggregat_summenfunktionen [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
  
 +/*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;
 +</​code>​
kurs/aggregat_summenfunktionen.txt ยท Last modified: 2014/09/10 21:22 (external edit)