working mysql based topfails site

This commit is contained in:
2010-04-07 11:25:28 -07:00
parent 095ed3c3b9
commit f95af53188
7 changed files with 5 additions and 6 deletions

View File

@@ -75,6 +75,6 @@ class Tests(models.Model):
def get_most_failing_tests():
cursor = connection.cursor()
cursor.execute("select count(*), name from (select builds.id, name from builds inner join tests on builds.id = tests.buildid group by builds.id, name) group by name order by count(*) desc limit 250")
cursor.execute("select count(*), name from (select builds.id, name from builds inner join tests on builds.id = tests.buildid group by builds.id, name) aaa group by name order by count(*) desc limit 250")
for row in cursor:
yield row