GROUP BY 和 WHERE 子句

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

use pubs
select type,avg(price)
from title
where advance > 5000
group by type
posted @ 2006-08-18 12:57  MSDI  阅读(379)  评论(0编辑  收藏  举报