MySQL Group By Clause

How to select the columns using Group by clause?


Group By Statement:

The MySQL Group by clause is used to display the rows and columns grouped by selective columns. It can be used to perform the aggregate functions, such as count().

Example :

The following example query will list the name of the student and also count the repeative names using Group By Statement.
MySQL Group By Clause
The below query will display the name and sum of marks of the student using MySQL group by clause.
MySQL Group By Clause
The above examples shows how to use the MySQL Group by clause in the select statement.

Ask Questions

Ask Question