Sum of only positive numbers #10029
-
I have large and complex query. One of columns is computed value that need sum of only positive numbers. Alternative in SQL is: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is only the condition part of an DQL.
|
Beta Was this translation helpful? Give feedback.
IF
sounds like you're using MySQL. If this question is about writing conditions in DQL, maybe this code snippet might help you to write your query:CASE WHEN f.name = 'foo' THEN 'its foo' ELSE 'NOT FOO' END AS qux
This is only the condition part of an DQL.