I need to first capture the max version associated with a file name here is the meatSELECT fileName, f.folderName, masterID, iterationId, iterationNumber version FROM fileIteration fi JOIN iteration i on (i.iterationID = fi.fileIterationID) JOIN vw_folderFileLink fl on (fl.fileMasterID = i.masterID) JOIN folder f on (f.folderID = fl.folderID) WHERE fileName LIKE '429020652.idw' --GROUP BY masterID, fi.FileName, f.FolderName, fileName, i.iterationID ORDER BY masterID, version DESC--*******end code ********--that returns these results: 429020652.idw SubPumps 715 7521 7429020652.idw SubPumps 715 7511 6429020652.idw SubPumps 715 7497 5429020652.idw SubPumps 715 7465 4429020652.idw SubPumps 715 7398 3429020652.idw SubPumps 715 7314 2429020652.idw SubPumps 715 7313 1
First I need help just getting that top row but then I need to get all expect the top row selected.. I've tryed using MAX in several ways but I'm not getting what i want here :/ any help is appreciated