Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    I think mt.currentstate = 'Yes' should be in where clause. Commented Oct 16, 2013 at 5:48
  • Now If i put mt.currentstate = 'Yes' inside WHERE clause, it will filter all the rows where mt.currentstate = 'Yes', but I need other column values from the rows mt.currentstate = 'No'..What I'm gonna do? Commented Oct 16, 2013 at 5:55
  • @Axel answered what you looking for Commented Oct 16, 2013 at 5:58
  • 1
    "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'" - Then you have to make two queries. One aggregates for currentstate = 'Yes', and one gives you all rows independent of currentstate. Or could you provide an example of the output you expect to make it clear? Commented Oct 16, 2013 at 6:22
  • @Axel Yes Axel, I guess "Then you have to make two queries. One aggregates for currentstate = 'Yes'..." suggestion is correct, I followed that way, Thanks a lot for the help.. Commented Oct 16, 2013 at 6:59