You could definatly do in v5, sure someone posted a sample report for similar.
Not sure if that report would work in v4 with the reports module addon - v5 saw many additional report expressions added and have never used v4 custom reporting myself.
v3 - no idea, this forum is for v4 and v5 - mostly v5 as even v4 has been superseeded.
There is av3 forum but very little activity on that.