Hi,I am having trouble adding values from two columns on two different tables. I want to add together the following two queries:SELECT TOP (10) SUM(dbo.Goals.Goals) AS Goals, dbo.Players.PlayerNameFROM dbo.Goals INNER JOIN dbo.Players ON dbo.Goals.PlayerID = dbo.Players.PlayerIDGROUP BY dbo.Players.PlayerName
Which returns:Goals PlayerName21 Adam Jones132 Alan Shearer4 Jason Sardoand this query:SELECT TOP (10) SUM(dbo.ArchiveGoals.Goals) AS Goals, dbo.Players.PlayerNameFROM dbo.ArchiveGoals INNER JOIN dbo.Players ON dbo.ArchiveGoals.PlayerID = dbo.Players.PlayerIDGROUP BY dbo.Players.PlayerName
Which returns:Goals PlayerName555 Adam JonesI though this would do the trick:SELECT TOP (10) SUM(Goals.Goals)+ SUM(ArchiveGoals.Goals) AS Goals, Players.PlayerNameFROM Goals INNER JOIN Players ON Goals.PlayerID = Players.PlayerID INNER JOIN ArchiveGoals ON Players.PlayerID = ArchiveGoals.PlayerIDGROUP BY Players.PlayerName
But all I get is:Goals PlayerName1131 Adam JonesThe query does not seem to have been grouped by the PlayerName.Any help gratefully received!