Oracle
 sql >> Database >  >> RDS >> Oracle

ORACLE SQL Esecuzione di TOTAL e daytotal utilizzando la funzione finestra

select trunc(hired), 
       count(*) hired_today,       
       sum(count(*)) over (order by trunc(hired)) as running_total
from emp
group by trunc(hired)

http://sqlfiddle.com/#!4/4bd36/9