Can you double check your table design? When I tested I get exactly what you said it should return.CREATE TABLE Movies (id int, name VARCHAR(50),priority INT)INSERT INTO movies VALUES (1, 'The Bucket List', 9),(2, 'The Wrestler', 8),(3, 'LOTR The Fellowship of the Ring', 10),(4, 'LOTR The Two Towers', 10),(5, 'LOTR The Return of the King', 10)select name from movies where priority=(select max(priority) from movies)/*returnsLOTR The Fellowship of the RingLOTR The Two TowersLOTR The Return of the King*/select name from movies where priority=(select min(priority) from movies)/*returnsThe Wrestler*/
Check that the priority column really is an int, not a string. If it's a string then 10 will be minimum and 9 maximum, so the min will return the 3 LotR movies and max will return The Bucket List. That's because in string comparison 9 is greater than 1.--Gail ShawSQL Server MVP