MongoDB Group,max仿关系型数据库例子,通过BsonJavaScript脚本实现。相当的SQL:select * from GroupDemo a right join (select userName,max(date) maxdate from GroupDemo group by userName) b on a date=b maxdate
MongoDB Group,max仿关系型数据库例子,通过BsonJavaScript脚本实现。相当的SQL:select * from GroupDemo a right join (select userName,max(date) maxdate from GroupDemo group by userName) b on a date=b maxdate