select (select top 1 fprice from ta b
where a.fid=b.fid and a.fsuid=b.fsuid
order by fdate desc ) as fpriceMAX ,fid,fsuid,max(fdate)
from ta a
group by fid ,fsuid
...全文
1163打赏收藏
这个SQL语句是如何执行的,该如何理解???
这个SQL语句执行过程是如何的?对子查询不了解, 还请大家指点! select (select top 1 fprice from ta b where a.fid=b.fid and a.fsuid=b.fsuid order by fdate desc ) as fpriceMAX ,fid,fsuid,max(fdate) from ta a group by fid ,fsuid