可以在包含 GROUP BY 子句的查询中使用 WHERE 子句。在进行任何分组之前,将消除不符合 WHERE 子句条件的行。例如:

use pubs
select type,avg(price)
from title
where advance > 5000
group by type

相关文章: