select t.*,row_number() over
  ( partition by t.panel_id, t.eqp_id, t.ppid, t.main_grade, t.glass_grade, t.defect_code_1, t.defect_position_1, t.action_user order by t.time_stamp desc)as rn
  from cmv_h_wip_sdef t where rn=1
  and t.panel_id='D97005024K75'
;
这个sql没有办法执行,我看的例子都是类似这样的,
t.panel_id, t.eqp_id, t.ppid, t.main_grade, t.glass_grade, t.defect_code_1, t.defect_position_1, t.action_user 
这些为表中的主要记录,这些会返回几笔记录,我要取的是时间最后的一笔,谢谢了