title: How to Group By on multiple column in a pig script
body: <p>What should be pig equivalent script of the below SQL query:</p>
  
  <pre><code>SELECT fld1, fld2, fld3, SUM(fld4)
  FROM Table1
  GROUP BY fld1, fld2, fld3;
  </code></pre>
  
  <p><strong>For Table1:</strong>                     </p>
  
  <pre><code>A    B   C  2    X   Y   Z
  A    B   C  3    X   Y   Z
  A    B   D  2    X   Y   Z
  A    C   D  2    X   Y   Z
  A    C   D  2    X   Y   Z
  A    C   D  2    X   Y   Z
  </code></pre>
  
  <p><strong>OUTPUT:</strong>                     </p>
  
  <pre><code>A    B   C  5           
  A    B   D  2           
  A    C   D  6           
  </code></pre>