I need to get the count of a column for a particular id, but only when the column value is "Yes". Following is wrong i guess. mid(PRIMARY KEY)
SELECT COUNT(mt.currentstate = 'Yes') AS currentstate FROM mytable mt WHERE mid = 100 GROUP BY mid; For the COUNT value only i need from the column mt.currentstate = 'Yes', but for the ResultSet I need to get all the values where mt.currentstate = 'Yes' or 'No'