Find last record of each day
问题 I use mongodb (I'm new in mongodb) to store data about my power consumption , each minute there is a new record, here is an example : {"id":"5309d4cae4b0fbd904cc00e1","adco":"O","hchc":7267599,"hchp":10805900,"hhphc":"g","ptec":"c","iinst":13,"papp":3010,"imax":58,"optarif":"s","isousc":60,"motdetat":"Á","date":1393156826114} so I have around 1440 records a day. I want to compute the cost by day, but the problem for this is that I need the last record of the day, because this record can give