title: select distinct column field and total sum for it in mysql
body: <p>i have following table:</p>
  
  <pre><code>topic_id(unique)  forum_id   forum_views
  
  1002                1885         5
  1003                1893         2
  1004                1885         3
  1005                1892         6
  </code></pre>
  
  <p>How can i get output like this: (unique forum_id with total forum views from above table)</p>
  
  <pre><code>forum_id    forum_views
  1885           8
  1893           2
  1892           6
  </code></pre>
  
  <p>ANY HELP IS APPRECIATED.</p>
  
  <p>This is what i am trying: </p>
  
  <blockquote>
    <p>select distinct forum_id, sum(topic_views) from table_name</p>
  </blockquote>