为什么这个查询语句不行min(date)

为何这个查询语句不行min(date)
一个数据库quote,有两个字段 code,date,每个code有多个date,现在我要查出
1.按照code分组
2.每个code的date的最小值,
3.这个最小值必须 >'20121001'
前两个条件的查询,可以写成
 select  code,min(date)   from quote   group by code;
有正确的结果。
为何下面的查询语句不可以满足三个条件
select  code,min(date)   from quote  where  min(date) > '20121001' group by code;
Error: misuse of aggregate: min()
请问,应当如何写?
------解决方案--------------------
select  code,min(date)   from quote   group by code having min(date) > '20121001' ;