[JAVA] [Question] Can nullif be used in the count function in JPQL?

Excuse me for the question.

I am currently creating a web application with STS. I would like to get the number of people who meet condition A and the number of people who meet condition B from the user master on the screen for collecting statistics with a single query.

I wrote the following JPQL statement, select new MyClass( count(nullif(m.Column,0)) ,count(nullif(m.Column,1))) from TUser t join t.mUser m where t.userId = m.userId...

I get the error ↓. line 1:101: expecting CLOSE, found '('

Isn't JPQL supporting using the nullif function in count? Or is it a matter of syntax writing? I am wondering when I see the example of the person who succeeded when writing nullif alone in the select statement. I'm sorry for my poor question, but I am waiting for your answer.

Environment: Spring Tool Suite 3.8.2    hibernate JPA

Recommended Posts

[Question] Can nullif be used in the count function in JPQL?
About the matter that hidden_field can be used insanely
Convenient shortcut keys that can be used in Eclipse
The story that the port can no longer be used in the Spring boot sample program
[Spring Data JPA] Can And condition be used in the automatically implemented method of delete?
Ruby on Rails 5 quick learning practice guide that can be used in the field Summary
The case that @Autowired could not be used in JUnit5
Summary of ORM "uroboroSQL" that can be used in enterprise Java
I made a question that can be used for a technical interview
SwiftUI View that can be used in combination with other frameworks
About the range and scope where Day16 variables can be used
Expression used in the fizz_buzz problem
Are you still exhausted to implement the search function? Gem'ransack' that can be implemented in an instant
I implemented the multiple image upload function in Rails so that multiple images can be slid for the post
[Spring Boot] List of validation rules that can be used in the property file for error messages
[Rails] "pry-rails" that can be used when saving with the create method
Specify the default JAVA_HOME used in buildship
Initial settings until S2Dao can be used
About the case that ("b" .. "aa") could not be used in Ruby Range
Technology excerpt that can be used for creating EC sites in Java training