Use not exists
as follows:
Select t.*
From your_table t
Where not exists
(Select 1 from your_table tt
Where tt.serial = t.serial and tt.revision > t.revision)
Or you can use analytical function as follows:
Select * from
(Select t.*,
Row_number() over (partition by serial order by revision desc) as rn
From your_table t) t
Where rn = 1
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…