i have table Employess:
|id|datetime |in-out|
|1 |2015-03-03 06:00:00|in |
|1 |2015-03-03 14:15:00|out |
|1 |2015-03-04 06:00:00|in |
|1 |2015-03-04 15:00:00|out |
I want create view with information how long work employees(id) such that
|id|datetime_in |datetime_out |how_log|
|1 |2015-03-03 06:00:00|2015-03-03 14:00:00|08:15 |
|1 |2015-03-04 06:00:00|2015-03-03 15:00:00|09:00 |
Could you help me?