title: sql query to select count of only max value from table
body: <pre><code>partyname    state        constituency     candidatename   district    votes
  
  BJP       Maharashtra   Nagpur-East     Nitin Gadkari   Nagpur       1200
  AAP       Maharashtra   Nagpur-East     Arvind Kejriwal Nagpur       750
  BJP       Maharashtra   Nagpur-West     Vicky           Nagpur       4800
  AAP       Maharashtra   Nagpur-West     Lucky           Nagpur       3500
  BJP       Maharashtra   Nagpur-North    Rakesh          Nagpur       100
  AAP       Maharashtra   Nagpur-North    Ravan          Nagpur       1500
  </code></pre>
  
  <p>below is my expected output for above table</p>
  
  <p>query select only max vlue from votes group by partyname and constituency and display like below output.    </p>
  
  <pre><code>partyname       Count
  
  BJP          2
  
  AAP          1
  </code></pre>
  
  <p><strong>bcoz bjp leads from nagpur -east and nagpur west</strong></p>
  
  <p><strong>so it display count 2</strong> </p>
  
  <p><strong>and aap leads from nagpur - north then it display only 1 count.</strong></p>
  
  <p>plz suggest me query......</p>