pg8000 icon indicating copy to clipboard operation
pg8000 copied to clipboard

Group By failed with date_trunc

Open rcourivaud opened this issue 2 years ago • 3 comments

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))

rcourivaud avatar Jan 11 '24 17:01 rcourivaud