use HAVING

This commit is contained in:
lyssom 2021-05-20 09:13:18 +08:00
parent 8959a84fed
commit 274e0103fa

View File

@ -394,7 +394,7 @@ class QuerySet(object):
sql += ' WITH TOTALS' sql += ' WITH TOTALS'
if self._having: if self._having:
sql += '\nhaving ' + self.having_as_sql() sql += '\nHAVING ' + self.having_as_sql()
if self._order_by: if self._order_by:
sql += '\nORDER BY ' + self.order_by_as_sql() sql += '\nORDER BY ' + self.order_by_as_sql()