SQL GROUP BY

GROUP BY statement is used in conjunction with the aggregate clauses to group the result-set by one or more columns.It will make groups of same values.

SYNTAX :
SELECT column_name, aggregate_function(column_name)
FROM table_name
WHERE column_name operator value
GROUP BY column_name ;

Table Name 'customers'

id

name

age

city

bill

1Tom34Paris5300
2Jhony51London 400
3Ram64Delhi20000.7
4Simon23Portland32.65

EXAMPLE:

select name  customers group by name;
This would produce following result:
NAME
Jhony
Ram
Simon
Tom



Online Execute/Compile