revised report query