title: How to inverse column and row in Redshift?
body: <p>How can I inverse my data in Redshift from</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">user_id</th>
  <th style="text-align: center;">type1</th>
  <th style="text-align: right;">type2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">true</td>
  <td style="text-align: right;">false</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">true</td>
  <td style="text-align: right;">false</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>to</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">user_id</th>
  <th style="text-align: center;">type</th>
  <th style="text-align: right;">value</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">type1</td>
  <td style="text-align: right;">true</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">type2</td>
  <td style="text-align: right;">false</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">type1</td>
  <td style="text-align: right;">true</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">type2</td>
  <td style="text-align: right;">false</td>
  </tr>
  </tbody>
  </table>
  </div>