select * from table t where not exists (select 1 from table where userid=t.userid and submit_time > submit_time)
mysql
select * from sns_user_profile t where type=1 and id not in(
select id from( select id, count(distinct title ) from sns_user_profile where type=1 group by title ) D
)