Query: Wrong Sql emitted when doing a .Distinct() query on a one-to-one join #7421
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
I have a
Thing
table, which has a one to zero/one relationship withThingExtended
:Now I want to write a query that finds the number of distinct values for
ThingExtended.SomeValue
for some subset ofThings
:Ba-da-BOOM! SQL error:
I put a sniffer on the Sql server, and found this script being run:
... which, aside from being invalid Sql, is incorrect logically, since I only want the "distinct" modifier to apply to
SomeValue
.The text was updated successfully, but these errors were encountered: