select
a.Name,
a.cost + b.cost
from
(select
Assignment.Name,
sum(People.Cost) as cost
from
Assignment,
People
where
Assignment.AssID=People.AssID
Group by
Assignment.Name) a,
(select
Assignment.Name,
sum(Equipment.Cost) as cost
from
Assignment,
Equipment
where
Assignment.AssID=Equipment.AssID
Group by
Assignment.Name) b
where
a.Name = b.Name
a.Name,
a.cost + b.cost
from
(select
Assignment.Name,
sum(People.Cost) as cost
from
Assignment,
People
where
Assignment.AssID=People.AssID
Group by
Assignment.Name) a,
(select
Assignment.Name,
sum(Equipment.Cost) as cost
from
Assignment,
Equipment
where
Assignment.AssID=Equipment.AssID
Group by
Assignment.Name) b
where
a.Name = b.Name
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货