sqlalchemy-json-querybuilder icon indicating copy to clipboard operation
sqlalchemy-json-querybuilder copied to clipboard

Update README.md

Open albcunha opened this issue 5 years ago • 0 comments

I was trying to group by a queryset with following stackoverflow answer from sqlalchemy import func Table.query.with_entities(Table.column, func.count(Table.column)).group_by(Table.column).all()

But, only the folowing code worked: queryset = search_test.query() queryset = queryset.with_entities(Table.column1, func.count(Table.column2)).group_by(Table.column1) results = queryset.all()

GREAT WORK!!!

I think it needs to close the function.

albcunha avatar Jul 06 '20 08:07 albcunha