如何從下表中提取FIRST'StartAddress'的每一天。MYSQL:如何從表中提取以下數據?
結果必須是這樣的。
+------------+---------------+--------------------+--------------------+
| Date | SamplingStart | StartAddress | StopAddress |
+------------+---------------+--------------------+--------------------+
| 2016-02-22 | 08:00:00 | 26 Riverside Drive | 70 Piet Retief |
| 2016-02-23 | 05:15:00 | Balizza | Mars |
+------------+---------------+--------------------+--------------------|
表:
+------------+---------------+--------------------+--------------------+
| Date | SamplingStart | StartAddress | StopAddress |
+------------+---------------+--------------------+--------------------+
| 2016-02-22 | 08:00:00 | 26 Riverside Drive | 70 Piet Retief |
| 2016-02-22 | 09:00:00 | 10 Glen Drive | 16 Olga Street |
| 2016-02-22 | 10:00:00 | 66 Bremerhof | 26 Bluewater Drive |
| 2016-02-22 | 11:00:00 | 7 New Street | Walker Drive |
| 2016-02-22 | 13:00:00 | Goodwood Street | Blouberg |
| 2016-02-22 | 15:00:00 | Marine Drive | William Moffet |
| 2016-02-22 | 18:00:00 | Jumanji | Paterson |
| 2016-02-23 | 07:00:00 | 25 Eazi Street | 70 Kings Street |
| 2016-02-23 | 07:20:00 | Cool Blue | Pick n Pay |
| 2016-02-23 | 05:15:00 | Balizza | Mars |
| 2016-02-23 | 20:15:00 | Neverland | Club Shakes |
| 2016-02-23 | 23:15:00 | Castros | Stones |
| 2016-02-23 | 14:45:00 | Seagate | Ermelo |
| 2016-02-23 | 16:30:00 | Mafikeng | Goodwood |
+------------+---------------+--------------------+--------------------+
使用分組日期列。 –