Software Testing

k2G9Eo9
RdZQRt6

Popular Posts

GROUP BY

The GROUP BY() Function is used to conjunction with an aggregate function to group the result-set by one or more column.
The basic syntax is as follows:
SELECT column_name,Aggregate_Function(column_name) FROM table_name WHEREcolumn_name operator value GROUP BY column_name
Employee
Emp_idNameSurnameSalaryDept_id
1RajeshKhanna450002
2SnehaGupta550004
3SandeepNehte950001
4KirtiPatil250003
5NileshJadhav450003
6DipeshDas350005
7KailashRane620001
8KavitaDeshpande480003
9SanjayDatt500003
10ShrutiHasan780001

Syntax For SQL:
SELECT Name, SUM(salary) FROM employee GROUP BY Dept_id
After Execute: 
First(Salary)
53800.00

No comments:

Post a Comment