Removed DISTINCT when counting visits for a short URL

This commit is contained in:
Alejandro Celaya 2020-05-03 10:22:00 +02:00
parent 80d41db901
commit c4ae89a279

View File

@ -95,7 +95,7 @@ class VisitRepository extends EntityRepository implements VisitRepositoryInterfa
public function countVisitsByShortCode(string $shortCode, ?string $domain = null, ?DateRange $dateRange = null): int
{
$qb = $this->createVisitsByShortCodeQueryBuilder($shortCode, $domain, $dateRange);
$qb->select('COUNT(DISTINCT v.id)');
$qb->select('COUNT(v.id)');
return (int) $qb->getQuery()->getSingleScalarResult();
}