File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -237,13 +237,13 @@ public function getTeamStats(int $teamId): array
237237 {
238238 // Get all statistics in a single optimized query
239239 $ stats = DocumentTranscription::where ('team_id ' , $ teamId )
240- ->selectRaw ('
240+ ->selectRaw ("
241241 COUNT(*) as total,
242- SUM(CASE WHEN status = " completed" THEN 1 ELSE 0 END) as completed,
243- SUM(CASE WHEN status = " pending" THEN 1 ELSE 0 END) as pending,
244- SUM(CASE WHEN status = " failed" THEN 1 ELSE 0 END) as failed,
245- AVG(CASE WHEN status = " completed" THEN JSON_EXTRACT(metadata, " $.confidence" ) ELSE NULL END) as avg_confidence
246- ' )
242+ SUM(CASE WHEN status = ' completed' THEN 1 ELSE 0 END) as completed,
243+ SUM(CASE WHEN status = ' pending' THEN 1 ELSE 0 END) as pending,
244+ SUM(CASE WHEN status = ' failed' THEN 1 ELSE 0 END) as failed,
245+ AVG(CASE WHEN status = ' completed' THEN JSON_EXTRACT(metadata, ' $.confidence' ) ELSE NULL END) as avg_confidence
246+ " )
247247 ->first ();
248248
249249 // Get total corrections count
You can’t perform that action at this time.
0 commit comments