SELECT WishList.Numero,SUM(Rate)/COUNT(*) AS Rating,COUNT(*) AS Rates FROM Rating; INNER JOIN WishList ON Rating.NoEntry=WishList.Numero; WHERE NoContent=2 GROUP BY 1 INTO CURSOR Temp SELECT TOP 100 Temp.Numero,WishList.Title,Temp.Rating,Temp.Rates FROM Temp; INNER JOIN WishList ON Temp.Numero=WishList.Numero; ORDER BY 3 DESCENDING,4 DESCENDING INTO CURSOR TempIs this possible with such SQLs? I have tried to resolve that since about half an hour but cannot figure out the proper way to do it.