-
Notifications
You must be signed in to change notification settings - Fork 13
Having clause
Tako Lee edited this page Mar 6, 2014
·
2 revisions
-
Condition in the same line as HAVING keyword
Option: fmt025_having_condition_in_newline = false, type: TFmtBoolean.
SELECT Employees.LastName, COUNT(Orders.OrderID) AS NumberOfOrders FROM (Orders INNER JOIN Employees ON Orders.EmployeeID=Employees.EmployeeID) GROUP BY LastName HAVING COUNT(Orders.OrderID) > 10;
-
Condition in new line, indent from 1 to n
Option: fmt025_having_condition_in_newline = true, type: TFmtBoolean.
Option: fmt026_having_condition_indent = n, type: int.
SELECT Employees.LastName, COUNT(Orders.OrderID) AS NumberOfOrders FROM (Orders INNER JOIN Employees ON Orders.EmployeeID=Employees.EmployeeID) GROUP BY LastName HAVING COUNT(Orders.OrderID) > 10;