如何获得TypeID
具有最大不同的行EffectivityDate
?
原始表
-----------------------------------------
| ID | TypeID | Value | EffectivityDate |
-----------------------------------------
| 1 | 1 | 2.3 | 1990-01-01 |
| 2 | 1 | 3.4 | 1999-10-31 |
| 3 | 2 | 1.1 | 1990-01-01 |
| 4 | 2 | 2.2 | 1999-10-31 |
| 5 | 3 | 6.1 | 1999-10-31 |
-----------------------------------------
查询结果
-----------------------------------------
| ID | TypeID | Value | EffectivityDate |
-----------------------------------------
| 2 | 1 | 3.4 | 1999-10-31 |
| 4 | 2 | 2.2 | 1999-10-31 |
| 5 | 3 | 6.1 | 1999-10-31 |
-----------------------------------------
有什么帮助吗?