最高值我有一個查詢,結果列得到與查詢結果在MySQL
+------+------+------------+--------------------+
| id | name | work_date | daily_typing_pages |
+------+------+------------+--------------------+
| 1 | John | 2007-01-24 | 250 |
| 2 | Ram | 2007-05-27 | 220 |
| 3 | Jack | 2007-05-06 | 170 |
| 3 | Jack | 2007-04-06 | 100 |
| 4 | Jill | 2007-04-06 | 220 |
| 5 | Zara | 2007-06-06 | 300 |
| 5 | Zara | 2007-02-06 | 350 |
+------+------+------------+--------------------+
我想在另一列這一結果的最大值我的輸出像
+------+------+------------+--------------------+-----------+
| id | name | work_date | daily_typing_pages | Max daily|
+------+------+------------+--------------------+-----------+
| 1 | John | 2007-01-24 | 250 | 350 |
| 2 | Ram | 2007-05-27 | 220 | 350 |
| 3 | Jack | 2007-05-06 | 170 | 350 |
| 3 | Jack | 2007-04-06 | 100 | 350 |
| 4 | Jill | 2007-04-06 | 220 | 350 |
| 5 | Zara | 2007-06-06 | 300 | 350 |
| 5 | Zara | 2007-02-06 | 350 | 350 |
+------+------+------------+--------------------+-----------+
您可以對返回最大值的派生表使用'CROSS JOIN'。如果您向我們顯示錶格的結構,我們可能會提供具體的查詢。 –