title: how to make pivot mysql table as follows?
body: <p>I want show data according date wise with geoup by User ID.</p>
  <p>The first shows the data stored in database and second table shows how i want to show the data on front end.</p>
  <p><strong>This is the table in Database :-</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>UserID    Date        Working Hrs
  1           2021-08-01    10
  2           2021-08-01    1
  3           2021-08-01    15
  1           2021-08-02    11
  2           2021-08-02    11
  3           2021-08-02    16
  1           2021-08-03    9
  2           2021-08-03    10
  3           2021-08-03    11</code></pre>
  </div>
  </div>
  </p>
  <p><strong>This is the table i want to create from db table :-</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>UserID  2021-08-01  2021-08-02  2021-08-03
  1        10            11           9
  2        1             11           10
  3        15            16           11</code></pre>
  </div>
  </div>
  </p>