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

Query: Aggregate operator generates wrong SQL with Top/Skip/Distinct #7693

Closed
smitpatel opened this issue Feb 23, 2017 · 0 comments
Closed
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@smitpatel
Copy link
Contributor

[ConditionalFact]
        public virtual void Sum_over_subquery_is_client_eval()
        {
            AssertQuery<Order>(os => os.Select(o => o.OrderID).Take(10).Sum());
        }

fails.
Query generated

SELECT SUM([o].[OrderID])
  FROM (
      SELECT TOP(@__p_0) [o].[OrderID]
      FROM [Orders] AS [o]
  ) AS [t]
@rowanmiller rowanmiller modified the milestones: 1.1.2, 2.0.0 Feb 24, 2017
@ajcvickers ajcvickers modified the milestones: 2.0.0-preview1, 2.0.0 Apr 19, 2017
@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Apr 21, 2017
@smitpatel smitpatel modified the milestones: 2.0.0-preview1, 2.0.0 Apr 25, 2017
@ajcvickers ajcvickers changed the title Query: Aggregate operator interaction with Top/Skip/Distinct Query: Aggregate operator generates wrong SQL with Top/Skip/Distinct May 9, 2017
@divega divega added closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. and removed closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. labels May 10, 2017
@ajcvickers ajcvickers modified the milestones: 2.0.0-preview1, 2.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

4 participants