有人知道如何按计数按查询过滤 sphinxql 组吗?例如,我有如下查询:
SELECT collection_id, count(*) as cnt
FROM mobile_content
WHERE collection_id != 0
GROUP BY collection_id
而且我只想得到 cnt 大于 5 的行。如果我做这样的事情,我会得到一个错误:
SELECT collection_id, count(*)
FROM mobile_content
WHERE collection_id != 0 AND count(*) > 5
GROUP BY collection_id;
ERROR 1064 (42000): sphinxql: Aggregates in 'where' clause prohibited near '5 GROUP BY collection_id'
我记得在旧版本中,我使用 @count 按结果过滤分组。
我当前的 sphinxsearch 版本是 2.1.5。在这个版本中是否可以按计数过滤结果?