views:

40

answers:

0

enter code hereHow do I get the distinct count the ProdID column in this aggregate query?

Dim query As SubSonic.SqlQuery = New SubSonic.Select(SubSonic.Aggregate.GroupBy(TOrders.DelivDateColumn, "DelivDate"),SubSonic.Aggregate.Count(TOrders.ProdIdColumn, "ProdId")).From(of TOrders)

If I add Distinct() at the end, its working on the result of the query result.

Update: I came up with this temp solution until someone can point me in the right direction

Dim reader As System.Data.IDataReader = New SubSonic.InlineQuery().ExecuteReader("select DelivDate, count(distinct ProdId) as ProdId from TOrders group by DelivDate")