62,041
社区成员
发帖
与我相关
我的任务
分享
select top 4
X.Id,X.title,X.context,X.name,X.type,X.img,X.updatedate ,X.date from
(
select distinct NW.Id,NW.title,NW.context,NW.updatedate as updatedate,NC.name,IG.type,IG.img ,IG.updatedate as date
from news as NW
left join newsclass as NC on NW.type =NC.id
left join ImgList as IG on NC.Name =IG.type
)as X
where X.type ='企业风采'
order by X.date desc
select top 4
X.Id,X.title,X.context,X.name,X.type,X.img,
X.updatedate ,X.date from
(
select distinct NW.Id,NW.title,NW.context,NW.updatedate as updatedate,NC.name,IG.type,IG.img ,IG.updatedate as date
from news as NW
left join newsclass as NC on NW.type =NC.id
left outer join ImgList as IG on NC.Name =IG.type
)as X
where X.type ='企业风采'
group by X.Id,X.title,X.context,X.name,X.type,X.img,X.updatedate ,X.date
order by X.updatedate,X.date desc
select top 4 NW.Id,NW.type,NW.title,NW.context,NW.updatedate,NC.name
from news as NW
left join newsclass as NC on NW.type =NC.id
left join ImgList as IG on NC.Name =IG.type
where IG.type='企业风采'
GROUP BY NW.Id,NW.type,NW.title,NW.context,NW.updatedate,NC.name
order by NW.updatedate desc,IG.updatedate desc