Mysql中如何查询 以某一列为条件的,再加最新更新时间的那一条数据

Mysql中如何查询 以某一列为条件的,再加最新更新时间的那一条数据
下面是我写的查询的,是有问题的

最开始是这样写
select * from adverts where large_categories = #{largeCategories}
       and small_categories = #{smallCategories}
       and MAX(update_time) 

后来是下面这样写,也不对

 select * , MAX(update_time) from adverts where large_categories = #{largeCategories}
       and small_categories = #{smallCategories}
SELECT ID,USER_ID,problems,last_updated_date  FROM  (select * from t_iov_help_feedback  order by USER_ID, LAST_UPDATED_DATE DESC) b GROUP BY b.USER_ID;
关联查询 on后跟了两个条件
select * from (select USER_ID,MAX(last_updated_date) group by USER_ID) as temp left join t_iov_help_feedback  as t on temp.USER_ID=t.USER_ID and temp.last_updated_date=t.last_updated_date;

这样写:
select * from 表 where id=(select max(id) from 表) //查询id号最大的一条数据,也可以换成时间列
union all
select * from 表 where ....

你的意思是查询有两个条件,第一是 找到某列对应上,第二是找到最新时间的。这个sql语句
select top 1 * from tablename where xxx='ada' order by 时间 desc

可以用 left join