The examples showing only the WHERE part mean that PetaPoco fills in the "SELECT * FROM TableName"
part for you, but of course you can execute your own sql statement
In your case:
public class ProductCount {
public int ProductType {get; set;}
public int Count {get; set;}
}
var ProductCountList = db.Fetch<ProductCount>(@"SELECT DISTINCT productType,
COUNT(*) as Count
FROM Products
GROUP BY productType");