有两张表 LIMS_Buy_AppList_Normal,LIMS_Buy_AppList_Standard 都有xxsupplyid,appdate字段 我想通过xxsupplyid 取出两张表中的appdateZ大值
select xxsupplyid,max(appdate) appdate
from (
select xxsupplyid,appdate
from
LIMS_Buy_AppList_Normal
union
select xxsupplyid,appdate
from
LIMS_Buy_AppList_Standard
) a
group by xxsupplyid