Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Just use COUNT:

SELECT errorgrund
      ,COUNT(*)
FROM table
GROUP BY errorgrund
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading