Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
可以使用 HAVING 子句来限制组中的行。
在 Interactive SQL 中,执行以下查询,列出订单数超过 55 的所有销售代表:
SELECT SalesRepresentative, COUNT( * ) AS orders FROM SalesOrders KEY JOIN Employees GROUP BY SalesRepresentative HAVING count( * ) > 55 ORDER BY orders DESC;