Query: GroupBy Where Aggregate translation to server
See original GitHub issueCurrently if there is predicate after grouping and before applying Aggregate operation we block the translation to server and do streaming GroupBy. Aggregate operator argument can take Case Block to do conditional aggregate and allow us to generate Group By clause in SQL. Structure would be
COUNT(
CASE
WHEN predicate
THEN projection
ELSE NULL
END
)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why does LINQ to SQL translate GroupBy into multiple ...
I think that query gets easily translated into SQL group by because it only involves an aggregate function and the aggregate column, but...
Read more >Complex Query Operators - EF Core
EF Core also translates queries where an aggregate operator on the grouping appears in a Where or OrderBy (or other ordering) LINQ operator....
Read more >SQL GROUP BY Statement
The GROUP BY statement is often used with aggregate functions ( COUNT() , MAX() , MIN() , SUM() , AVG() ) to group...
Read more >SQL | GROUP BY
The GROUP BY Statement in SQL is used to arrange identical data into groups with the help of some functions. i.e. if a...
Read more >SQL Group By Tutorial: Count, Sum, Average, and Having ...
In this article we'll look at how to construct a GROUP BY clause, what it does to your query, and how you can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello @smitpatel I recently stumbled upon this issue and found that there is a family of equivalent aggregates:
(maybe more?)
Please support them all in the context of this feature. This code from NHibernate seems relevant and useful.
@AlekseyMartynov - Thanks for information. All of them are normalized into single form in our query parser so shouldn’t be issue in supporting them all.