Answer the question
In order to leave comments, you need to log in
Grouping values by days if the field is in timestamp format?
Good evening comrade friends.
There are collections in monge in which fields with the date of addition in the timestamp format:
date_add: 1484249082
how do I group them to get a selection ala:
{
date: 2017-01-01
count:3
},
{
date: 2017-01-02
count:4
},
{
date: 2017-01-03
count:0
},
...
Answer the question
In order to leave comments, you need to log in
SELECT ... GROUP BY DATE(`datetimecolumn`)
From here took
Not it? Or basically json should be the view?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question