How to count specific products?
In your first query the error is produced by the attribute type, which is in the select clause, but not in the group by clause. This is due to the fact that there are different values of type for each group. So, instead of writing:

select maker, type from product group by maker
having count(distinct type) = 6 and count(distinct model) &gt; 1


you should either remove type:

select maker from product group by maker
having count(distinct type) = 6 and count(distinct model) &gt; 1


or use an aggregation function for it, like in the second query:

select maker, min(type) from product group by maker
having count(distinct type) = 6 and count(distinct model) &gt; 1