title: Time Attendances SQL Query
body: <p>I am currently struggling with writing an SQL Query. </p>
  
  <p>This is how my table looks like and where i want to retrieve data from:</p>
  
  <p><a href="https://i.stack.imgur.com/0p84K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0p84K.png" alt="enter image description here"></a></p>
  
  <p>I want to write a query that has the following result:</p>
  
  <p><a href="https://i.stack.imgur.com/5LZUF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5LZUF.png" alt="enter image description here"></a></p>
  
  <p>As you can see in the first table an employee can check IN and OUT more than 2 times a day. When a employee checks in for the first time the Date/time should be placed in the first colum "CheckIn". When he checks in for the second time the Date/time should be placed in the second column "CheckOut". When he checks in for the 3th time the Date/time should be placed in the column "CheckIn" and so on.</p>