Add node type condition to user statistics query