Frage

This is my current table:

+---+----------+
| id| date     |
+---+----------+
| 1 |2014-05-05|
+---+----------+
| 2 |2014-05-06|
+---+----------+
| 3 |2014-05-06|
+---+----------+
| 4 |2014-05-07|
+---+----------+
| 5 |2014-05-07|
+---+----------+
| 6 |2014-05-07|
+---+----------+

These are the results I'm looking for:

+---+----------+
| id| date     |
+---+----------+
| 1 |2014-05-05|
+---+----------+
| 2 |2014-05-06|
+---+----------+
| 4 |2014-05-07|
+---+----------+
War es hilfreich?

Lösung

SELECT MIN(ID), DATE FROM TABLE_NAME GROUP BY DATE;
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top