select (select itemval from plat.pf45 where typeid = 'housetype' and P_LEVEL = '2' and itemid = b.housetype) , count(1) from ln003 a, ln014 b where a.loancontrcode = b.loancontrcode group by b.housetype
这个sql没有问题
结果是 itemval count 这两列
我想把pf45这个表中 SYSTEMID 这一列也类出来
SYSTEMID itemval count 这三列 应该怎么写呢
select (select SYSTEMID ,itemval from plat.pf45 where typeid = 'housetype' and P_LEVEL = '2' and itemid = b.housetype) , count(1) from ln003 a, ln014 b where a.loancontrcode = b.loancontrcode group by b.housetype
这样不行