title: Oracle Select Max Date on Multiple records
body: <p>I've got the following SELECT statement, and based on what I've seen here: <a href="https://stackoverflow.com/questions/4816844/sql-select-max-date-with-multiple-records">SQL Select Max Date with Multiple records</a> I've got my example set up the same way.  I'm on Oracle 11g.  Instead of returning one record for each asset_tag, it's returning multiples.  Not as many records as in the source table, but more than (I think) it should be.  If I run the inner SELECT statement, it also returns the correct set of records (1 per asset_tag), which really has me stumped.</p>
  
  <pre><code>SELECT 
  outside.asset_tag,
  outside.description, 
  outside.asset_type, 
  outside.asset_group, 
  outside.status_code, 
  outside.license_no, 
  outside.rentable_yn, 
  outside.manufacture_code, 
  outside.model, 
  outside.manufacture_vin, 
  outside.vehicle_yr, 
  outside.meter_id, 
  outside.mtr_uom, 
  outside.mtr_reading, 
  outside.last_read_date
  FROM mp_vehicle_asset_profile outside
  RIGHT OUTER JOIN
    (
    SELECT asset_tag, max(last_read_date) as last_read_date
    FROM mp_vehicle_asset_profile
    group by asset_tag
    ) inside
  ON outside.last_read_date=inside.last_read_date
  </code></pre>
  
  <p>Any suggestions?</p>