当我尝试时:
select *
from some_table
group by table_id
order by timestamp desc;
我得到的行timestamp
对于那个特定的值最小table_id
(我用于分组)
我怎样才能获得该特定值具有最高timestamp
值的行table_id
。
我也试过:
select *
from some_table
group by table_id
having max(timestamp)
order by timestamp desc;
这给出了与第一种情况相同的结果。
谢谢你