I'm having trouble with sorting out a query for the following:
Data:
Column1 Column2
2 0
0 -2
I'm trying to select the difference between Column1 and Column2, with a minimum of 0. Eg.
Row1=2
Row2=0
My current query is SELECT (Column1 - Column2) as total FROM blah
.
I tried adding max(Column2, 0)
into the query, but that just errors.