diff --git a/lib/Models/Segment.php b/lib/Models/Segment.php index a6925d27f2..fc20251420 100644 --- a/lib/Models/Segment.php +++ b/lib/Models/Segment.php @@ -190,7 +190,7 @@ class Segment extends Model { '(SELECT segments.id, segments.name, COUNT(relation.subscriber_id) as subscribers ' . 'FROM ' . MP_SUBSCRIBER_SEGMENT_TABLE . ' relation ' . 'LEFT JOIN ' . self::$_table . ' segments ON segments.id = relation.segment_id ' . - 'LEFT JOIN ' . MP_SUBSCRIBERS_TABLE . ' subscribers ON subscribers.id = relation.subscriber_id ' . + 'INNER JOIN ' . MP_SUBSCRIBERS_TABLE . ' subscribers ON subscribers.id = relation.subscriber_id ' . 'WHERE relation.segment_id IS NOT NULL ' . 'AND subscribers.deleted_at IS NULL ' . 'GROUP BY segments.id) ' .