name | sub1 | sub2 | sub3
__________________________
prad | poor| good | poor
vas | good | poor | poor
I want to count the number of ‘poor’ each person getting
I tried the query "SELECT name, COUNT(name) FROM tbl_name where (sub1,sub2,sub3)='poor' group by name;"
It doesn’t work ..please help
How can I count row wise?
Try this if you can have many equal names in your table (you didn’t specify what was the primary key):
Here is an example
Or this if you don’t have repeated names in your table:
Here is an example
Let me know if this works.