Group By in Flask-SQLAlchemy

preview_player
Показать описание
In this video I show you how to write a group by query in Flask-SQLAlchemy.

Рекомендации по теме
Комментарии
Автор

this guy is underrated among python community

Vijay-Yarramsetty
Автор

Great video as usual thanks :) for anyone out there who doesn’t know standard SQL I’d recommend you learn it. SQL Alchemy is great at a lot of things but it’s far easier sometimes to write a standard sql statement and there’s no reason why you wouldn’t for a group by. Less typing is everything... just compare the end result with the sql statement used at the beginning of this vid.

m
Автор

Very good video! This one together with the other ones helped me so much in my project! And this one was just what i needed for something i was trying, and now it works!

ZOOSnippets
Автор

Thanks so mutch for your courses in youtube, i search in multiples sites one or others questions for resolve my code and ever finding these responses in your courses. Very thanks @PrettyPrinted

i use Model.query in my project.
StatusAtendimento.query.with_entities(StatusAtendimento.status_atendimento, db.func.count(Atendimento.id)).filter(Atendimento.tenant_id==1).outerjoin(Atendimento,

nelsonfonseca
Автор

cool video, as usual, can you help with little question, I need to count rows and then filter it by count numbers (more than 5, or just equal 2 for example) but I can't find a way for that. I try == 1), but it didn't work. can you give me a right way for searching? thank you!

aks_kj
Автор

great video as usual.
However, facing an issue here:
the calculated fields are not rendered by the flask_marshmallow Schema.
In your example, how to modify the Schema of Purchase to display either the count or the sum when dumping the BaseQuery result object ?

I tried many ways, failed each time. Only the name is displayed but not the result of any function

Rgds

jeromealtariba
Автор

Getting a 404 error on the link the course.

steveisenberg