select count(distinct atetId) from t_payplatform_gonline a
where to_char(a.createtime,'yyyyMMdd')<='20141028'
and (copyright=1 or copyright=2)
and a.atetId in (
select b.atetId from t_payplatform_gonline b
where a.channelId = b.channelId
and a.deviceId = b.deviceId
and to_char(b.createtime,'yyyyMMdd')<'20141028'
and (copyright = 1 or copyright = 2)
);
这个语句在查询的时候会报:Error: org.apache.phoenix.parse.InParseNode[A.ATETID, org.apache.phoenix.parse.SubqueryParseNode@1722d01]
SQLState: null
ErrorCode: 0
这里的A.ATETID就是in前面的一个。不知道这样的查询还能换成其他的办法嘛?是否支持子查询?谁有详细的资料。跪谢!
|