Opposite of Find Duplicates

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?
 
V

vanderghast

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top