Skip to content

Commit

Permalink
using numbered indexes for group and order.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Nov 28, 2011
1 parent 7fbe473 commit cf3b970
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tracstats/web_ui.py
Expand Up @@ -1023,10 +1023,10 @@ def _process_tickets(self, req, cursor, where, since, data):
from ticket
where (resolution is null or length(resolution) = 0) """ +
where.replace('where', 'and').replace('author', 'reporter') + """
group by component
group by 1
) as open using (component) """ +
where.replace('time', 't.time').replace('author', 't.reporter') + """
group by t.component, open.total order by count desc
group by 1, 3 order by 2 desc
""")
rows = cursor.fetchall()
stats = []
Expand All @@ -1045,10 +1045,10 @@ def _process_tickets(self, req, cursor, where, since, data):
from ticket
where (resolution is null or length(resolution) = 0) """ +
where.replace('where', 'and').replace('author', 'reporter') + """
group by milestone
group by 1
) as open using (milestone) """ +
where.replace('time', 't.time').replace('author', 't.reporter') + """
group by t.milestone, open.total order by count desc
group by 1, 3 order by 2 desc
""")
rows = cursor.fetchall()
stats = []
Expand Down

0 comments on commit cf3b970

Please sign in to comment.