i have the following table
id rack usage day
1 rack1 100 20141210
2 rack1 120 20141211
3 rack1 135 20141212
4 rack1 144 20141213
5 rack1 160 20141214
6 rack1 165 20141215
7 rack1 167 20141216
i would like to get the diffrent of the usage per day. how to acomplish with select query? so it will result
day usage
20141210 0
20141211 20
20141212 15
20141213 9
20141214 16
20141215 5
20141216 3