摘要:
一个查询句子/*查询账目不对的人的用户表+缴费表*/selectB.StuId,A.StuName as 用户, sum(B.ShouldPay) as '应交款' ,sum(B.Paid)+sum(B.Preferential)+sum(B.Owe) as '加起来以后',sum(B.Paid) as '实交',sum(B.Preferential) as '优惠',sum(B.Owe) as '欠款'from StudentInfo as A inner join StudentPayment as B on 阅读全文