title: identify individual entries in column in linux
body: <p>I want to display the individual entries from multiple rows based on a column value. for example in the below example, I want only user from column 4 having most PD entries from column 5 and to display the count of their individual entries in the column 7. 
  example input: </p>
  
  <pre><code>column 4  column 5    column 7
  abc           PD      8
  xyz           PD      1
  abc           PD      2
  xyz           PD      7
  xyz           PD      3
  xyz           R       1
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>column 4  column 5    column 7
  xyz           PD      3
  </code></pre>
  
  <p>I tried using squeue command as i'm using to find job user information.subsetting for a specific column where PD is maximum in the criterion.</p>
  
  <pre><code>squeue | awk '($5 == "PD")'| awk '{a[$4]+=$7} END{for(i in a) print i,$5,a[i]}'| sort -r -k 3,3| head -n1
  
  
  squeue | awk '($5 == "PD")'| uniq -r -k 3,3 | head -n1
  </code></pre>
  
  <p>I am not getting the required answer. </p>