I want to get counts for various data groupings in some of my tables and am not sure if this is possible with DAL2.
I want to fulfill queries such as:
SELECT DISTINCT productType, COUNT(*) FROM Products GROUP BY productType
The information I come across includes only examples that allow the user to specify the WHERE SQL part. This example, unfortunately, skirts right around the WHERE query part, so I'm not sure how I should approach this with DAL2. Is it possible to use DAL2 or do I need to query the database differently? If this can be done using DAL2, how can I execute such a query?
source
share