2014-02-13 171 views
0

有誰知道如何通過count過濾查詢sphinxql組? 比如我有查詢關鍵詞,比如:通過計數查詢過濾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。在這個版本中是否可以通過計數來過濾結果?

回答