$query = self::find()->where('
user_id = :user_id AND sender_id != :user_id AND status != :status',
[
'user_id' => Yii::$app->user->id,
'status' => Pm::STATUS_DELETE,
])
->groupBy('sender_id')
->with(['profile']);
$zeroStatusCount = self::find()->where('
user_id = :user_id AND sender_id != :user_id AND status = :status',
[
'user_id' => Yii::$app->user->id,
'status' => 0,
])
->groupBy('sender_id')
->count();