title: Teradata - Max value of a dataset with corresponding date
body: <p>This is probably obvious, I just can't seem to get it to work right.  Let's say I have a table of various servers and their CPU percentages for every day for the past year.  I want to basically say:</p>
  
  <p>"for every server name, show me the max CPU value that this server hit (from this dataset) and the corresponding date that it happened on"</p>
  
  <p>So ideally I would get a result like:</p>
  
  <p>server1 52.34% 3/16/2012<br>
  server2 48.76% 4/15/2012<br>
  server3 98.32% 6/16/2012<br>
  etc..</p>
  
  <p>When I try to do this like so, I can't use a group by or else it just shows me every date:</p>
  
  <p>select servername, date, max(cpu) from cpu_values group by 1,2 order by 1,2;</p>
  
  <p>This of course just gives me every server and every date..  Sub-query? Partition by?  Any assistance would be appreciated!</p>