我有下表。
我希望基于以下条件编写一个SQL查询:其中阶段为筛选,状态为状态=(已选择/已拒绝/已删除)作为面试日期的数据的最小值(实际为日期)
答案 0 :(得分:0)
尝试一下
select
t1.stage, t1.status, t2.data
from
table as t1
inner join
(select
stage, min(data) as data
from
table
group by
stage) as t2 on t1.stage = t2.stage and t1.data = t2.data