Hello, I'm creating a simple query with aggregates. The example is:
string query = new SubSonic.Query.Select(
SubSonic.Query.Aggregate.GroupBy("ProductID", "ID"),
SubSonic.Query.Aggregate.Max("Price", "MaxPrice")
).From("Orders").ToString();
The Sql Result is:
SELECT ProductID AS ID, MAX(Price) AS MaxPrice
FROM [Orders]
when the result must be:
SELECT ProductID AS ID, MAX(Price) AS MaxPrice
FROM [Orders]
GROUP BY ProductID
In SubSonic2.2 the result is correct but in Subsonic3 , the GROUP BY statement dissapear and the query return only one row.
Is correct my SqlQuery expression? or is a bug in Subsonic3? I'm using Subsonic 3.0.0.3.
Thank you!!