Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Explain GROUP BY Clause in SQL ?

The GROUP BY clause can be used in a SELECT statement to collect data across multiple records and group the results by one or more columns.

 

Syntax:

SELECT column(n) FROM table_name

WHERE [ conditions ]

GROUP BY column(n)

ORDER BY column(n)

 

The GROUP BY clause must before ORDER BY clause if ORDER BY clause exist.

Related Posts Plugin for WordPress, Blogger...
Flag Counter