I have a table, the data in it looks similar to this:
user type hours used --to make another column with this info available
2334 sick 10.000 2.000 8.000
2334 vacation 48.000 56.000 -8.000
2334 personal 0 8.000 0
1356 sick 0 16.000 -16.000
1356 vacation 80.000 0 80.000
1356 personal 14.000 14.000 0
4355 sick 4.000 1.000 3.000
4355 vacation 112.000 0 112.000
4355 personal 8.000 0 8.000
I had to sum up the values in the hours column, but only for each user. So user 2334 would have earned 58.000 hours, 10.000 + 48.000 + 0 but would have used 66.000 hours resulting in -8.000 hours.
1 Answer