title: Calculating percentage in a pig query by group
body: <p>I have a table with three columns (typeofcrime, disctrict, year)</p>
  
  <p>Example:</p>
  
  <pre><code>typeofcrime district year
  HOMICIDE 092 2016
  THEFT 053 2017
  HOMICIDE 075 2016
  ASSAULT 025 2014
  </code></pre>
  
  <p>I want to calculate the percentage of <strong>HOMICIDES</strong> for each district and year.</p>
  
  <p>Something like this:</p>
  
  <pre><code>DISTRICT YEAR PERCENTAGE OF HOMICDE
  075  2016   33%
  092  2016    0%
  025 2014     2%
  </code></pre>
  
  <p>How can I do this in PigLatin?</p>