temp inner join 成绩表 on
temp.姓名=成绩表.姓名and temp.成绩=成绩表.成绩
SELECT *
FROM dbo.Data_Education
WHERE e_user in (SELECT e_user, max(e_diploma) as e_diploma FROM dbo.Data_Education group by e_user)
子查询SELECT e_user, max(e_diploma) as e_diploma FROM dbo.Data_Education group by e_user只能返回一列,可以改成
SELECT *
FROM dbo.Data_Education
WHERE e_user in (select e_user from (SELECT e_user, max(e_diploma) as e_diploma FROM dbo.Data_Education group by e_user))
select max(id) id, send_id, receiver_idfrom messages
where receiver_id='3'
group by send_id, receiver_id
order by id desc
limit 0,10
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)