Query to get activity from database was set to take the deleted records by mistake.

Which is corrected and gets result properly.