SQL GROUP BY Statement

SQL GROUP BY Statement

Instructor-svgAl-Mamun Sarkar
Apr 16 , 2020

SQL GROUP BY Statement. The following SQL queries show how to use GROUP BY while querying data from database using SQL.

 

GROUP BY Syntax:

SELECT column, column
FROM table_name
WHERE condition
GROUP BY column

Example:

SELECT COUNT(id), country
FROM employees
GROUP BY country;

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram