Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT Format(A.Date,'yyyy-mm') AS [Month],A.EmpId,A.EmpName,SUM(A.Bonus_payout) AS Bonus
FROM yourTable A
WHERE Year(A.Date)=Year(Now())-1
GROUP BY Format(A.Date,'yyyy-mm'),A.EmpId,A.EmpName
HAVING SUM(A.Bonus_payout) IN (
SELECT TOP 5 SUM(Bonus_payout) FROM yourTable
WHERE Format([Date],'yyyy-mm')=Format(A.Date,'yyyy-mm')
GROUP BY EmpId ORDER BY 1 DESC)
ORDER BY 1, 4 DESC