select top 1 sortinfo.title,sortinfo.ReadLink,files.NewName,files.path from sortinfo,files where sortinfo.AuthorUnitCode=1106 and sortinfo.ITag=3 and sortinfo.SID=23 and sortinfo.fj=1 and files.ParentID=sortinfo.IID and files.ExtName in ('bmp','jpg','jpeg','gif','png') order by sortinfo.IID Desc,files.ID