时间:2021-07-01 10:21:17 帮助过:32人阅读
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
sql with 写法
标签:and select group sel assign sig history ssi sql