0
我有以下查询:SQL统计汇总查询
select prop_id
, sum(amount)bnp_spent
, (select count(*) from cost where cost_type = 'Direct Cost')direct
, (select count(*) from cost where cost_type = 'Burden Cost')burden
from cost
group by prop_id
的子查询是不是我想要的。通过从成本表中选择,我得到的是直接或负担所有道具
我想是的直接和间接成本为每PROP_ID
任何帮助是极大的赞赏计成本的总数。
+1,为你2秒快速:-) – 2012-07-24 14:31:22
我认为触摸打字是我参加了高中最重要的类。 – 2012-07-24 14:33:18