ich eine SQL-Abfrage haben:Gruppe eine Reihe von Daten
SELECT COUNT(id) AS number_plays, id
FROM table
WHERE date_play >= '2017-08-27 00:00:00' AND date_play <= '2017-08-27 23:59:59'
GROUP BY id, date_play
HAVING number_plays > 1
ORDER BY number_plays DESC
Und das Ergebnis kommt so etwas wie sein aus:
number_plays id
20 15
40 15
32 18
20 15
Ist es zu einer Gruppe durch die Anzahl der Stücke dieses Ergebnis möglich ? Am Ende etwas wie:
iterations number_plays id
2 20 15
1 40 15
1 32 18
Kann ich Hilfe bekommen? Danke im Voraus.