how can i use having?
example:
targets = meta.Session.query(ObjetoCusto.objeto_custo_id,
ObjetoCusto.descricao).\
join(TipoObjeto).\
join(EtapaObjeto).\
filter(EtapaObjeto.ano_id == c.year).\
distinct().having(func.count(ObjetoCusto.mes_id) ==
12).order_by(ObjetoCusto.descricao).all()
i need to return where count(mes_id) = 12
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---