Fix query

This commit is contained in:
David Boucha 2012-11-21 15:40:07 -07:00
parent fe63f52c9e
commit 3556343cb2

View File

@ -128,9 +128,9 @@ def get_fun(fun):
cur = serv.cursor()
sql = '''SELECT s.id, s.fun, s.jid
FROM `salt_returns` s
FROM `salt`.`salt_returns` s
JOIN ( SELECT MAX(`jid`) as jid
from `salt_returns` GROUP BY fun, id) max
from `salt`.`salt_returns` GROUP BY fun, id) max
ON s.jid = max.jid
WHERE `fun` = '%s'
GROUP BY id