There are several ambiguities in the "pudding" challenge.
- Unclear if offenders are defined as taking >2 puddings or >=2 puddings (conflicting wording; note that the placeholder comment also refers to this, and should also say 'snr_manager_id' instead of 'senior_manager_id').
- Unspecified how top 5 offenders are chosen if there are ties for 5th place.
- There are cases where multiple puddings are taken at the same instant (probably shouldn't be allowed, because it would be unclear who took the last pudding).
I'm also pretty certain that the model answer is incorrect (regardless of how these ambiguities are interpreted). Please check this; I'd be happy to send you my code.
If the focus is on coming up with the SQL queries rather than getting all the fine details correct, consider adding (optional) intermediate stages to help users check their intermediate results, because debugging based on the final result is difficult.
It would be nice if a model solution was shown after solving the challenge, to compare and learn.
Finally, I think you should ask the user for permission before publishing their score on the leaderboard.