i'm glad you solved it, but i should like to point out that ...
1) `tableA.product_number` and `tableB.produkt_number` are invalid (you can't put backticks around the qualified columns like that)
2) you don't actually need a view
Code:
SELECT COUNT(*) AS howmuch
, typ
FROM ( SELECT tableA.product_number AS numer
, tableB.typ_of_product AS typ
, tableA.costs AS s
FROM tableA
INNER
JOIN tableB
ON tableB.produkt_number = tableA.product_number
) AS temporary
GROUP
BY typ
ORDER
BY homuch DESC
