Скрыть последних авторов
Alexandr Fokin 6.1 1 qtest
Alexandr Fokin 4.1 2 {{code language="sql"}}
3
4 SELECT
5 t1.GroupItem,
6 t1.SortProperty
7 FROM
8 dbo.Table1 t1
9 JOIN (
10 SELECT
11 t1.GroupItem,
12 max(t1.SortProperty) AS MaxSortValue
13 FROM
14 dbo.Table1 t1
15 GROUP BY
16 t1.GroupItem
17 ) AS dt ON t1.GroupItem = dt.GroupItem
Alexandr Fokin 5.1 18 --AND t1.SortProperty = dt.MaxSortValue
Alexandr Fokin 4.1 19
20 {{/code}}