Opposite of Find Duplicates

  • Thread starter Thread starter Pellissier
  • Start date Start date
P

Pellissier

I have a single table with a unique CPT Code field, a Price field and a
Department field.

Different Departments sometimes charge a different Price for the same CPT
Code item.

I need to find just those that are different so we can investigate and
stabilize pricing across the system.

Does someone know how to do this easily?
 
SELECT cpt
FROM somewhere
GROUP BY cpt
HAVING MAX(unitPrice) <> MIN(unitPrice)


should do, since, for a given "cpt", if the MAXimum unit price differs than
the MINimum one, there are many DIFFERENT prices for that cpt.



Vanderghast, Access MVP
 
Back
Top