title: How to get multiple columns from one column, SQL
body: <p>I have been looking for the solution for a while, I have the following SQL database:</p>
  <pre><code>| Date                  | Name          | Value |
  |-----------------------|---------------|-------|
  |  01-01-2020:12:00     |  sensor01     |   5   |
  |  01-01-2020:13:00     |  sensor01     |   15  |
  |  01-01-2020:14:00     |  sensor01     |   25  |
  |  01-01-2020:12:00     |  sensor02     |   10  |
  |  01-01-2020:13:00     |  sensor02     |   20  |
  |  01-01-2020:14:00     |  sensor02     |   30  |
  </code></pre>
  <p>What I want to do is to actually spread the data from the Name column in multiple columns where the Values are matched under each column. So as follow:</p>
  <pre><code>| Date                  | Sensor01      | Sensor02  |
  |-----------------------|---------------|-----------|
  |  01-01-2020:12:00     |  5            |   10      |
  |  01-01-2020:13:00     |  15           |   20      |
  |  01-01-2020:14:00     |  25           |   30      |
  </code></pre>
  <p>I tried several things including: the &quot;PIVOT&quot; function and &quot;when case&quot; but that didn't really help and I am still stuck!
  How can I best do that? which functions should be used?</p>
  <p>I am still beginner, so any tips / ideas / advice are highly appreciated.</p>
  <p>Thanks in advance!</p>