Skip to main content

Posts

Showing posts with the label Oracle group by clause

Group By Clause In ORACLE

This clause is used to group the data over a specified column by eliminating duplicates.    Group by clause always arranged the data in ascending order .    The column which is used at group by clause, the same column can be used for the retrieving the data.    Group by clause will group the data over a single or multiple columns.     Examples :=    1)    Display total salary of all the three departments from the “ emp ” table.    Ans : Select sum(sal) from emp         Group by deptno ;            2)    Display deptno and total salary of all the 3 departments from “emp”table.    Ans : Select deptno,sum(sal) from emp            Group by deptno;    3)   Display deptno and total salary, which is being paid to dept 20.    Ans :...