300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > SQL查询 子查询作为结果字段

SQL查询 子查询作为结果字段

时间:2022-08-10 11:48:46

相关推荐

SQL查询 子查询作为结果字段

SQL查询,子查询作为结果字段,

SELECT code,sp.projectname,sp.projecttime,sp.busnature,sp.bustype,sl.concode,sl.conname,sl.contype,sl.conpartya,sl.contotal,sl.conrisedate,sl.constopdate,sl.contotalperiod,(SELECTSUM(chargemoney)FROMsab_b_conpay scWHEREsc.concode = sl.concodeGROUP BYsc.concode) AS chargemoney000,(SELECTSUM(confirmamount)FROMsab_b_conpay scWHEREsc.concode = sl.concodeGROUP BYsc.concode) AS confirmamount000,(SELECTSUM(noconfirmamount)FROMsab_b_conpay scWHEREsc.concode = sl.concodeGROUP BYsc.concode) AS noconfirmamount000FROMsab_b_ledger slLEFT JOIN sab_b_project sp ON sl.projectcode = sp.projectcode

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。