标签:and select group sel assign sig history ssi sql
with h_asign_id as (
select asign_id from assign_h h
left join assignment a on a.id = h.asign_id
where 1=1
group by h.asign_id
)
select h.asign_id from assign_history h, h_asign_id i
where
h.id in ( select max(assign_h.id) from assign_h where assign_hasign_id = h.asign_id)
and
h.asign_id = i.asign_id
标签:and select group sel assign sig history ssi sql
原文地址:http://www.cnblogs.com/yingjie13/p/7511377.html