pg8000
pg8000 copied to clipboard
Group By failed with date_trunc
I don't really understand but this query runs well with pg8000 driver 1.30.3 but fails with the new version
db.query( Invoice.energy, func.date_trunc("month", Invoice.date).label("month"), func.sum(Invoice.consumption).label("consumption"), )
query = query.group_by(Invoice.energy, func.date_trunc("month", Invoice.date))