27,580
社区成员
发帖
与我相关
我的任务
分享select a.tid,a.fid ,b.information
from tb1 a
left join (select tid,max(information) as information from tb2 group by tid) b
on a.tid = b.tidselect a.fid,min(b.informaiton) as information from a
inner join b on a.tid = b.id
group by a.fid
select a.*,b.* from 第一个表 a,第二个表 b
where a.tid=b.tid
and not exists(select 1 from 第二个表 where tid=b.tid and information>b.information )