title: SQL Pivot table by date
body: <p>i have a table like this;</p>
  
  <p><a href="https://i.stack.imgur.com/j4x6w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j4x6w.png" alt="enter image description here"></a></p>
  
  <p>I want to display my data like this;</p>
  
  <pre><code>PersonelName------EnterDate1------EnterDate2------EnterDate3------EnterDateN
     Michael------------6---------------8----------------7----------TotalWorkHour
     Jason--------------5---------------8----------------6----------TotalWorkHour
     Terra--------------6---------------6----------------6----------TotalWorkHour
     Amelie-------------8---------------8----------------7----------TotalWorkHour
  </code></pre>
  
  <p>EnterDates must be dynamic and with two days between.
  I had a personnel table.</p>
  
  <p>I cant figurate this logic. I cant understand pivot. Please help me.
  Thanks for now.</p>