Revised note deletion query for delete user transaction