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 :...
Welcome to our blog for SQL and PLSQL. Here you will find about the SQL basic to advance level things along with PLSQL. Also you will get the latest SQL related Interview questions and answers. I hope you will get the things you are looking for here. Happy learning for SQL and PL-SQL.