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

SQLAlchemy: Investigate sub-query variants of queries with count and aggregate functions #91

Open
amotl opened this issue Dec 21, 2022 · 1 comment

Comments

@amotl
Copy link
Member

amotl commented Dec 21, 2022

Hi there,

at crate/crate-python#464 (comment), we found a spot in the documentation which reads like that:

SQLAlchemy supports different approaches to issue a query with a count aggregate function. Take a look at the count result rows documentation for a full overview.

CrateDB currently does not support all variants as it can not handle the sub-queries yet. This means that queries using count() have to be written in one of the following ways: [...]

It may be a thing of the past. Based on this observation, we should re-evaluate the matter and create a corresponding issue at the crate/crate repository if there are still variants CrateDB can't handle.

With kind regards,
Andreas.

References

https://github.com/crate/crate-python/blob/5dc0e04362b3c20f583b0ca9d034bfff78eda087/docs/by-example/sqlalchemy/advanced-querying.rst?plain=1#L108-L119

https://github.com/crate/crate-python/blob/5dc0e04362b3c20f583b0ca9d034bfff78eda087/docs/sqlalchemy.rst?plain=1#L489-L511

@amotl
Copy link
Member Author

amotl commented Jun 5, 2023

@seut said there are no known pitfalls with sub-queries with current versions of CrateDB, so we should remove that statement from the documentation.

@amotl amotl transferred this issue from crate/crate-python Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant