Use aggregate function with arithmetic operation. : [according to the picture, I have a table with two columns][1]
Here I need to find a SQL according to the following function, 

Z = accelx-AVG(accelx) for every rows. 

[1]: https://i.stack.imgur.com/vjWAe.png