user agent best diff

This commit is contained in:
Ben Wilson
2023-08-03 22:40:21 -04:00
parent f907d6efe1
commit 726b906071
+1
View File
@@ -81,6 +81,7 @@ export class ClientService {
const result = await this.clientRepository.createQueryBuilder('client') const result = await this.clientRepository.createQueryBuilder('client')
.select('client.userAgent as userAgent') .select('client.userAgent as userAgent')
.addSelect('COUNT(client.userAgent)', 'count') .addSelect('COUNT(client.userAgent)', 'count')
.addSelect('MAX(client.bestDifficulty)', 'bestDifficulty')
.groupBy('client.userAgent') .groupBy('client.userAgent')
.orderBy('count', 'DESC') .orderBy('count', 'DESC')
.getRawMany(); .getRawMany();