The following functions are available with from sqlalchemy import func
:
func.min
func.max
func.avg
Documentation is available here.
You can use them i.e. in the query() method.
Example:
session.query(self.stats.c.ID, func.max(self.stats.c.STA_DATE))
(just like you use agragate functions in plain SQL)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…