数据库|mysql查询结果去重

select * from (select * from t_stb_log where 1=1 and hotelid =355order by (UNIX_TIMESTAMP(lastonlinetime)-UNIX_TIMESTAMP(logintime))/60desc ) a group by a.stbnum order by lastonlinetime

    推荐阅读