subtract value from one row after according to hours
Hi, I have a time variable displaying distinct hours and another variable displaying cost(so there is 1 cost value per hour). How can I calculate the difference such that for eg. the cost for 09:00 minus 08:00 and this applies to the rest of the hours? wanted output below.