Skip to content

Sum of only positive numbers #10029

Closed Answered by SenseException
l-you asked this question in Support Questions
Discussion options

You must be logged in to vote

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.

array:1 [
  "qux" => "its foo"
]
array:1 [
  "qux" => "NOT FOO"
]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by l-you
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants