not exists 解决group by排序问题

来源:互联网 发布:艺术字生成器软件下载 编辑:程序博客网 时间:2024/04/29 12:38
  select select task.PROCINST_ piID from jbpm_taskinstance task,jbpm_processinstance pi
where pi.END_ !='' and pi.ID_=task.PROCINST_
and  not exists (SELECT 1 from jbpm_taskinstance where end_<task.END_ and PROCINST_ =task.PROCINST_)
and task.ACTORID_='admin';