I have a query that looks like this:
SELECT VRCRaceRegistrants.PSNID, Sum(VRCRaceRegistrants.Points) AS TotalPoints, VRCRaceRegistrants.RaceYear
FROM VRCRaceRegistrants
GROUP BY VRCRaceRegistrants.PSNID, VRCRaceRegistrants.RaceYear
ORDER BY VRCRaceRegistrants.PSNID, Sum(VRCRaceRegistrants.Points) DESC;
It lists data as such:
Year Driver Points 2011 Driver1 100 2012 Driver1 200 2011 Driver2 150 2012 Driver2 100 2011 Driver3 100
I want to show the difference between 2011 and 2012, like so:
Driver Diff Driver1 +100 Driver2 -50 Driver3 Null
I there another query I need to write or a tweek to this one?