I am trying to create a function that generates time differences. I first want to select a unique user, then all the records for this user and then calculate the difference