SQL GROUP BY statement

In this chapter you will learn:
What is GROUP BY statement
Syntax of group by statement
Example of group by statement

What is GROUP BY statement

The group by statement or clause is used to display the result in the group with the aggregate functions. It follows the where statement in a select statement.

Syntax of group by

Select column_list from table_name where condition group by expression

Example of group by statement

 
select title, minimum=min(vacationhours),maximum=max(vacationhours) from humanresources.employee where vacationhours>90 group by title
screen shot of group-by   SUMMARY

In this chapter, you have learned about a group by statement or clause. In the next chapter you will learn about compute by clause.

More Articles

 

Share your thought