mongodb 高级部分 group by case when select distinct substr(sdf,0,6)
一、gourpby和casewhen的混用1、且看一张表格,表格的结构是(其中一条数据){"_id":ObjectId("57876215b522253ff42e3346"),"type":NumberInt(0),"userId":NumberInt(101920),"pointsNum":NumberInt(50),"createdDate":NumberLong(1468490260993)