1SELECT
2 c1, c2,..., cn, aggregate_function(ci)
3FROM
4 table
5WHERE
6 where_conditions
7GROUP BY c1 , c2,...,cn;
1 SELECT column_name(s)
2 FROM table_name
3 WHERE condition
4 GROUP BY column_name(s)
5 HAVING condition
6 ORDER BY column_name(s);
1SELECT Manufacturer, COUNT(*) AS ModelsCount
2FROM Products
3WHERE Price > 30000
4GROUP BY Manufacturer
5ORDER BY ModelsCount DESC
6