Sunday, January 11, 2015

Explain the use of Group By with an example.

Group By is used along with aggregate functions to group the result-set by one or more columns.

Example: The query below will display employees along with their salaries.


SELECT employee_name,SUM(salary) FROM employee GROUP BY employee_name

No comments:

Post a Comment