Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouping by year, month, day #420

Open
madvas opened this issue Mar 19, 2015 · 1 comment
Open

Grouping by year, month, day #420

madvas opened this issue Mar 19, 2015 · 1 comment

Comments

@madvas
Copy link

madvas commented Mar 19, 2015

I'm not sure if it's currently possible, but I didn't find anything related to that.

I mean, to be able to use group_by in json query for some Date, DateTime column, but to group by only by year or month or day, etc.

In sqlalchemy it's done somehow like this

import sqlalchemy as sa
DBSession.query(Article).group_by( sa.func.year(Article.created), sa.func.month(Article.created)).all()
@jfinkels
Copy link
Owner

Seems like a valid feature...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants