This commit is contained in:
parent
64315356ae
commit
8b6e20ba00
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ func generateStats(ctx context.Context) ([]ChartData, error) {
|
||||||
rows, err = db.Query(ctx,
|
rows, err = db.Query(ctx,
|
||||||
`SELECT date_trunc('day', updated_at) date, status, COUNT(*) AS count
|
`SELECT date_trunc('day', updated_at) date, status, COUNT(*) AS count
|
||||||
FROM tasks
|
FROM tasks
|
||||||
WHERE status = $1 OR status = $2
|
WHERE updated_at > current_date - 7 AND (status = $1 OR status = $2)
|
||||||
GROUP BY 1,2
|
GROUP BY 1,2
|
||||||
ORDER BY date ;`, constants.TASK_STATUS_SUCCESS, constants.TASK_STATUS_FAILED)
|
ORDER BY date ;`, constants.TASK_STATUS_SUCCESS, constants.TASK_STATUS_FAILED)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue