2012年3月31日

SqlServer 多表查询

摘要: select t1.ID as ID,t1.NAME as NAME,t1.PLACE as PLACE,t1.soPrice as SO_PRICE,t1.soCount as SO_COUNT,t2.sroPrice as SRO_PRICE,t2.sroCount as SRO_COUNT,(t1.soPrice*t1.soCount - t2.sroPrice*t2.sroCount) as PROFIT from (select pro.ID ,pro.NAME ,pro.PLACE ,so.PRICE as soPrice,sum(so.COUNT) as soCount from 阅读全文

posted @ 2012-03-31 18:47 吐个泡泡 阅读(218) 评论(0) 推荐(0) 编辑

导航