答案 0 :(得分:0)
这应该做你想要的:
SELECT [name]
, [date]
, [dep]
, [sum(k1)]
FROM ork3
INNER JOIN
(SELECT [name]
, SUM([k1]) AS [sum(k1)]
FROM ork2
GROUP BY [name]) AS ork2 ON ork3.[name] = ork2.[name];
答案 1 :(得分:0)
你可以做;
Select name, sum(k1) From ork3 o3 Inner Join ork2 o2 On o2.name = o3.name group by o3.name;