在 java 中使用 mongodb,如果写出类似 mysql 中这样的查询语句:
SELECT COUNT(seq_id) AS numbers,DATE_FORMAT(created,'%Y-%m-%d %H') AS cday
FROM pt_user_chat_log
WHERE robot_id =6 AND (created BETWEEN '2018-05-02 00' AND '2018-05-03 00')
GROUP BY DAY(created),MONTH(created),YEAR(created)
ORDER BY cday ASC
1
zkx664832 2018-05-13 21:01:23 +08:00 1
$group
|