yup...clear as mud -- Find a Nike352 shoe selling at any competitor -- other than sports authority -- that is selling for less than any Nike (and that would be MAX(Price) right?) -- at sports authority...CREATE TABLE #myTable99( Retailer varchar(50), Shoe varchar(50), Price money)GOINSERT #myTable99 (Retailer, Shoe, Price)SELECT 'Sport Authority', 'Nike352', 150.00 UNION ALLSELECT 'Sport Authority', 'Nike456', 250.00 UNION ALLSELECT 'Sport Authority', 'Nike789', 50.00 UNION ALLSELECT 'Foot Locker' , 'Nike352', 150.00 UNION ALLSELECT 'Foot Locker' , 'Nike456', 250.00 UNION ALLSELECT 'Foot Locker' , 'Nike789', 350.00 UNION ALLSELECT 'Foot Action' , 'Nike352', 149.00 UNION ALLSELECT 'Foot Action' , 'Nike456', 249.00 UNION ALLSELECT 'Foot Action' , 'Nike789', 349.00 UNION ALLSELECT 'Marshals' , 'Nike352', 49.00 UNION ALLSELECT 'Sear' , 'Nike352', 1.00 UNION ALLSELECT 'LLBean' , 'Nike352', 249.00 UNION ALLSELECT 'Land Fill' , 'Nike352', .01GOSELECT * FROM #myTable99WHERE Retailer <> 'Sport Authority'AND Shoe = 'Nike352'AND Price < (SELECT MAX(Price) FROM #myTable99 WHERE Retailer = 'Sport Authority')GODROP TABLE #myTable99GO
Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam