select a.* from tbas_2016 a,(select mmsi, max(utc1) utc1 from tbas_2016 group by mmsi) b where a.mmsi = b.mmsi and a.utc1 = b.utc1 order by a.mmsi
select a.mmsi, a.portid,a.utc1,a.utc2,a.utc3 from tbas_2016 a where
utc1 = (select max(utc1) from tbas_2016 where mmsi=a.mmsi) order by mmsi