title: calculate login logout time in mysql
body: <p>I have a table structure like this</p>
  
  <p><img src="https://i.stack.imgur.com/TFBIw.png" alt="x"></p>
  
  <p>Time capture in a single column on basis of the event. But I required one complete event in a single row. </p>
  
  <p>Required data like this:</p>
  
  <p><img src="https://i.stack.imgur.com/30bWt.png" alt="y"></p>