Syntax of GROUP BY clause in SQL-
SELECTย <column_name(s)>
FROMย <table_name>
WHERE<condition>
GROUP BY<column_name(s)>;
Example of GROUP BY clause in SQL-
SELECT COUNTย (CustomerID), Country
FROMย Customers
GROUP BYย Country;
โThis SQL statement will list the number of customers in each country.
Saraswat World Changed status to publish June 8, 2023
Leave a Reply