title: Aggregate values in Pig Latin
body: <p>After performing multi-level filtering inside Pig, I get the below results - </p>
  
  <pre><code>(2343433,Argentina,2015,Sci-Fi)
  (2343433,France,2015,Sci-Fi)
  (2343433,Germany,2015,Sci-Fi)
  (2343433,Netherlands,2015,Sci-Fi)
  (2343433,Argentina,2015,Drama)
  (2343433,France,2015,Drama)
  (2343433,Germany,2015,Drama)
  (2343433,Netherlands,2015,Drama)
  (2343433,Argentina,2015,Family)
  (2343433,France,2015,Family)
  (2343433,Germany,2015,Family)
  (2343433,Netherlands,2015,Family)
  </code></pre>
  
  <p>The column names are movieid,country,year and genre respectively. I need to aggregate these results and produce something like this - </p>
  
  <pre><code>(2343433,France,2015,Sci-Fi,Drama,Family)
  (2343433,Germany,2015,Sci-Fi,Drama,Family)
  (2343433,Netherlands,2015,Sci-Fi,Drama,Family)
  (2343433,Argentina,2015,Sci-Fi,Drama,Family)
  </code></pre>
  
  <p>Either that or something like this - </p>
  
  <pre><code> (2343433,France,Germany,Netherlands,Argentina,2015,Sci-Fi,Drama,Family)
  </code></pre>
  
  <p>Below is my code to get the above results - </p>
  
  <pre><code>A = LOAD '/user/a1.csv' USING PigStorage('|') as (movie_id,movie_name,prod_year);
  B = LOAD '/user/a2.csv' USING PigStorage('|') as (g_movieid,genres);
  C = LOAD '/user/a3.csv' USING PigStorage('|') as (c_movieid,country_released);
  D = JOIN A by movie_id, B by g_movieid;
  E = JOIN D by g_movieid, C by c_movieid;
  F = FOREACH E GENERATE movie_id,country,year,genre;
  </code></pre>
  
  <p>Any idea on how to achieve this using Pig?</p>