I want to no if there any way to add an "Having" constrain to an aggregation select?
Example: if i need all sales sum by date having the sales sum > 1000.
Best Regards,
TheGodfather
subsonic
I want to no if there any way to add an "Having" constrain to an aggregation select?
Example: if i need all sales sum by date having the sales sum > 1000.
Best Regards,
TheGodfather
Best Answer
SubSonic does have a "having" but you don't explicitly state it.
It is determined from you selecting an Aggregate and adding the Aggregate to the Where clause.
For example (paraphrased from SubSonic AggregateTests.cs)
The SubSonic query above will create a SQL statement with a "HAVING AVG(UnitPrice) > 50"