Skip to content

Commit

Permalink
Dashboard stats query fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy committed Oct 4, 2024
1 parent dcc6b40 commit d43c3f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/queries/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ export const dashboardStats = () => {
return {
text: `
SELECT round(AVG((overview -> 'maxVu')::int)) as "avgVu",
round(AVG((overview -> 'duration')::int)) as "avgDuration",
round(SUM((overview -> 'duration')::int)) as "totalDuration",
round(AVG((overview -> 'duration')::bigInt)) as "avgDuration",
round(SUM((overview -> 'duration')::bigInt)) as "totalDuration",
count(*) as "totalCount" from jtl.item_stat as stat
LEFT JOIN jtl.items as items ON items.id = stat.item_id
WHERE items.report_status = 'ready';`,
Expand Down

0 comments on commit d43c3f6

Please sign in to comment.