Actually my query is like this :
SELECT ABS(20-80) columnA , ABS(10-70) columnB ,
ABS(30-70) columnC , ABS(40-70) columnD , etc..
The pb is each ABS() is in fact some complex calculation , and i need to add a last columnTotal witch is the SUM of each ABS() , and i'd like to do that in one way without recalculate all . What i'd like to achieve is :
SELECT ABS(20-80) columnA , ABS(10-70) columnB ,
ABS(30-70) columnC , ABS(40-70) columnD , SUM(columnA+columnB+columnC+columnD) columnTotal
. The result expected look like this :
columnA columnB columnC columnD columnTotal
60 60 40 30 190
don't know if its possible
you can wrap it in one more layer like this:
Yes, in MySQL you can do it like this way:
Use a Derived Table: