I have a table which summarize the time spent by users on a specific page of the app. I want to get the total time spent on this page per day.
The table:
user_id date label_of_the_page
1 2019-03-03T00:21:56.384Z . page we want
1 2019-03-03T00:21:57.314Z page we want
1 2019-03-03T00:21:58.024Z . page we want
1 2019-03-03T00:21:59.384Z new page
The idea is to make the difference between the first time the label_of_the_page is the page I want, and the time for which the label change. But, we have to do it for each person who reach the page. It can be several time the same user_id, so grouping by user_id is not a good idea, I think...