我尝试从包含20条或更多邮件的各个ips中选择所有邮件,但我在选择邮件时遇到问题。这是我的疑问:
SELECT messages
FROM currentChat
HAVING count(id) >= 20
GROUP by ip
答案 0 :(得分:2)
您需要var templates = {
'a': function () {return "Something"},
'b': function () {return "Something"},
'c': function () {return "Something"}
};
Object.keys(templates).forEach(function(helperName){
Template.registerHelper(helperName, function(){
return templates[helperName];
})
});
或类似的东西:
join
答案 1 :(得分:1)
您可以使用子查询来获得结果
SELECT *
FROM currentChat
WHERE ip IN (SELECT ip FROM currentChat GROUP BY ip HAVING COUNT(*) >= 20)