I need to count some data from my database but don’t how build the right sql query.
I have in my error column different error reasons. In total there are 4 diferent reasons. Now I need to count und sum them foreach resons. so i want to have the total number foreach error reason. what is the function therefore?
>Solution :
Just use COUNT:
SELECT errorgrund
,COUNT(*)
FROM table
GROUP BY errorgrund