题目内容

group中添加分组条件应该用?

A. where
B. cond
C. having
D. find

查看答案
更多问题

下面哪个操作符不能放在aggregate的第一级?

A. $group
B. $match
C. $sort
D. $sum

以下不能实现统计各个部门男教师的人数的命令是?

A. db.teachers.aggregate([{$match:{"sex":"男"}},{$group:{"_id":{"dept":"$dept"},"num_count":{$sum:1}}}])
B. db.teachers.aggregate([{$group:{"_id":{"dept":"$dept"},"num_count":{$sum:1}}},{$match:{"sex":"男"}}])
C. db.teachers.group({"key":{"dept":2},"initial":{"count":0},"reduce":function(cur,result){return result.count++},"cond":{"sex":"男"}})
D. db.teachers.runCommand({"group":{"ns":"teachers","key":{"dept":0},"initial":{"count":0},"$reduce": function(cur,result){result.count++;},"cond":{"sex":"男"}}})

aggregate()中的$group可以用哪些操作符进行运算?

A. $max
B. $min
C. $push
D. $avg

单纯疱疹病毒性脑炎的诊断依据哪项是错误的

A. CT或MRI发现颞叶局灶性出血性脑软化灶
B. 特异性抗病毒药物治疗有效
C. 脑电图显示弥漫性异常,以颞、额区为主
D. CSF细胞数增多或出现红细胞,糖和氯化物明显增多
E. 口唇或生殖道疱疹史,出现发热,精神行为异常,意识障碍和早期局灶性神经系统损害体征

答案查题题库