title: BASH: Finding maximum value in a particular CSV column
body: <p>I have a CSV file <code>million_songs_metadata_and_sales.csv</code> having the following schema.</p>
  
  <pre><code>track_id    
  sales_date  
  sales_count
  title
  song_id 
  release 
  artist_id   
  artist_mbid 
  artist_name 
  duration    
  artist_familiarity  
  artist_hotttnesss
  year
  </code></pre>
  
  <p>Sample data:</p>
  
  <pre><code>TRZZZZZ12903D05E3A,2014-06-19,79,Infra Stellar,SOZPUEF12AF72A9F2A,Archives Vol. 2,ARBG8621187FB54842,4279aba0-1bde-40a9-8fb2-c63d165dc554,Delerium,495.22893,0.69652442519,0.498471038842,2001
  </code></pre>
  
  <p>I need to write a query in BASH to find the artist_name with maximum sales using the file <code>million_songs_metadata_and_sales.csv</code>.</p>
  
  <p>I have written the following script but it fails to give me the correct data:</p>
  
  <pre><code>awk 'max=="" || $3 &gt; max {max=$3} END{ print $9}' FS="," million_songs_metadata_and_sales.csv
  </code></pre>
  
  <p>Any work around to this issue?
  Thanks!</p>