title: sum of all value but group by distinct another column
body: <p>I have a question on <strong>distinct</strong> argument. (Or more generally in <strong>select</strong> argument)  </p>
  
  <p>I want to group by one distinct column, but in another sum column I need to sum all value. At first, I want to use the following query.</p>
  
  <pre><code>SELECT ZIP5,  date,   COUNT(ID), SUM(WEIGHT)
  
  FROM ops_owner.track_mail_item
  
  GROUP BY ZIP5, distinct (TRUNC(DATE))
  </code></pre>
  
  <p>PL/SQL development return <strong>it is missing expression</strong>. I know that might be because I do not using same distinct (TRUNC(DATE)) in select sentence.</p>
  
  <p>However, I am do want to ID and Sum will have all value added,even if date is duplicate. <strong>I am afraid the distinct (TRUNC(DATE)) in select sentence willl remove those duplicate record so the count/sum will be lower than what I want.</strong></p>
  
  <p>Can any one tell me whether I can use following query to get distinct date and all sum&amp;count value including duplicate?</p>
  
  <pre><code>SELECT ZIP5,  distinct (TRUNC(DATE)),   COUNT(ID), SUM(WEIGHT)
  
  FROM ops_owner.track_mail_item
  
  GROUP BY ZIP5, distinct (TRUNC(DATE))
  </code></pre>