Hi,
ich habe eine MySQL Tabelle mit folgenden Spalten: "key, regionID, timestamp".
In der Tabelle werden zu bestimmten Ereignissen der timestamp (wann es passiert ist), sowie die regionID (wo es passiert ist) gespeichert.
Es gibt insgesamt 50 verschiedene Regionen und ich würde gerne den neuesten timestamp zu jeder Region wissen.
Gibt es da irgendeine Möglichkeit das in einem Query zu machen?
Also nicht indem ich 50x diesen Query mache:
SQL-Anweisung
1:
| SELECT `timestamp` FROM `events` WHERE `regionID` = ? LIMIT 0,1 |
sondern alles in einem mit 50 Zeilen als result - irgendwie machbar?
Danke,
Daniela