错误代码:1111。无效使用组功能

时间:2015-08-28 10:27:44

标签: mysql

public class RequestFuture<T> implements Future<T>, Response.Listener<T>, Response.ErrorListener {
    ...
    Response.Listener mListener;
    Response.ErrorListener mErrorListener;
    ...
}

谁能告诉我为什么会出现这个错误?

1 个答案:

答案 0 :(得分:0)

错误在下面一行。除了WHERE子句

之外,您不能在HAVING子句中使用类似的组函数
where max(postal_code) 

您可以尝试修改您的查询,如下所示

select max_postalcode 
from 
(
select max(postal_code) as max_postalcode,
Min(postal_code) as min_postal_code 
from address
where district is not null
group by district
having  min(postal_code) is not null
) xxx 
where max_postalcode = min_postal_code;