ORder TAsk Status
All checks were successful
/ release (push) Successful in 28s

This commit is contained in:
Samuel Lorch 2024-07-14 02:31:10 +02:00
parent a75ce3287d
commit 4c3df8fef6

View file

@ -205,7 +205,8 @@ func generateStats(ctx context.Context) ([]ChartData, error) {
`SELECT date_trunc('day', updated_at) date, status, COUNT(*) AS count
FROM tasks
WHERE status = $1 OR status = $2
GROUP BY 1,2;`, constants.TASK_STATUS_SUCCESS, constants.TASK_STATUS_FAILED)
GROUP BY 1,2
ORDER BY updated_at ;`, constants.TASK_STATUS_SUCCESS, constants.TASK_STATUS_FAILED)
if err != nil {
return nil, fmt.Errorf("Query Task Status Day: %w", err)
}