I have a query this example:
Code: Select all
SELECT xyz,
SUM(CASE WHEN FieldA BETWEEN 100 AND 200 THEN (Field3+Field3)-(Field4+Field4) ELSE 0 END)
FROM MyTable
GROUP BY xyz
If I delete group by of the query I can view the data but this is a problem because I need to group by the data and then apply a filter
Help Me.