i have one column timestamp when user enters the app and another column when user leaves the app . i want to calculate the time spent on the app : sum(timestamp_exit) - sum (timestamp_enter) .
right now i've tried to right the current query :
select (SUM(unix_timestamp(`created_time_enter`))) as enter , (SUM(unix_timestamp(`created_time_exit`))) as exit
FROM `my_table`
but i get large numbers and i don't know if it's the correct way. any suggestion?