Skip to content

Commit

Permalink
Fix: need to group by runtime and retrieved_at
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Oct 6, 2014
1 parent ebea118 commit 87db809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redash/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def all_queries(cls):
q = Query.select(Query, User, QueryResult.retrieved_at, QueryResult.runtime)\
.join(QueryResult, join_type=peewee.JOIN_LEFT_OUTER)\
.switch(Query).join(User)\
.group_by(Query.id, User.id, QueryResult.id)
.group_by(Query.id, User.id, QueryResult.id, QueryResult.retrieved_at, QueryResult.runtime)

return q

Expand Down

0 comments on commit 87db809

Please sign in to comment.