title: Unpivot data in PostgreSQL
body: <p>I have a table in PostgreSQL with the below values,</p>
  <pre><code>empid    hyderabad    bangalore    mumbai    chennai
   1        20           30           40        50
   2        10           20           30        40
  </code></pre>
  <p>And my output should be like below</p>
  <pre><code>empid    city         nos
  1        hyderabad    20
  1        bangalore    30
  1        mumbai       40
  1        chennai      50
  2        hyderabad    10
  2        bangalore    20
  2        mumbai       30
  2        chennai      40
  </code></pre>
  <p>How can I do this unpivot in PostgreSQL?</p>