title: Hadoop Pig Max Command
body: <p>I have one file that contains data of all the countries from all over the world.</p>
  
  <p>I want to find out the country which has maximum airport.</p>
  
  <p>I have written below code:</p>
  
  <pre><code>A = load 'airports.dat' USING PigStorage (',') AS(AirportID:int,Name:chararray,City:chararray,Country:chararray,IATA:chararray,IATAothers:chararray,Latitude:float,Longitude:float,Altitude:float,Timezone:float,DST:chararray,Zone:chararray);
  B= GROUP A BY Country;
  C= FOREACH B GENERATE A.Country, COUNT(A) AS Count;
  </code></pre>
  
  <p>but after this I am not getting how to find the maximum.</p>
  
  <p>Can anybody please help.</p>