I have a small problem with SQL. I need to select ID of rows and group them into arrays (or something) BY MONTH? I have a timestamp column there.
So if there are rows like this:
[5.1996] => array(),
[10.2017] => array([1,2]);
You are probably looking for
select group_concat(id separator ', ') as myList, DATE_FORMAT(Timestamp, '%Y-%m') from <YOUR_TABLE> GROUP BY DATE_FORMAT(Timestamp, '%Y-%m');