Hi guys,
I am trying to combine two queries aggregation queries in Access but I am struggling with the syntax.
I want the final query to return the following fields: venue, League, batsmanId, ballsFacedByGrLg and ballsFacedbyLg.
Can anyone point me in the right direction?
Thanks
I am trying to combine two queries aggregation queries in Access but I am struggling with the syntax.
I want the final query to return the following fields: venue, League, batsmanId, ballsFacedByGrLg and ballsFacedbyLg.
Can anyone point me in the right direction?
Thanks
SQL:
SELECT Matches.venue, Matches.League, ScorecardBatting.batsmanId, SUM(ballsFaced) AS ballsFacedByGrLg
FROM Matches INNER JOIN ScorecardBatting ON Matches.matchId = ScorecardBatting.matchId
GROUP BY Matches.venue, Matches.League, ScorecardBatting.batsmanId;
SQL:
SELECT Matches.League, ScorecardBatting.batsmanId, SUM(ballsFaced) AS ballsFacedByLg
FROM Matches INNER JOIN
ScorecardBatting
ON Matches.matchId = ScorecardBatting.matchId
GROUP BY Matches.League, ScorecardBatting.batsmanId;