how to build SQL query?

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?

enter image description here

>Solution :

Just use COUNT:

SELECT errorgrund
FROM table
GROUP BY errorgrund

Leave a Reply