title: Make name column in SQL
body: <p>I am looking for an efficient way to convert rows to columns in SQL. Can the name of the column depend on the line change? Here is my example:</p>
  
  <p>Name table films and Visitors</p>
  
  <pre class="lang-none prettyprint-override"><code>Id | film
  0  | comedy 
  1  | horror 
  2  | drama
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>Id | visitors
  0  | 3
  1  | 10
  2  | 4
  0  | 8
  1  | 5
  2  | 1
  </code></pre>
  
  <p>I must current sum of comedy, drama, horror where the column names reflects the category of films currently in use. I don't know how.. Could you write this? Please </p>