for Inner Query Check https://gateoverflow.in/273528/self-doubt-sql
Inner Query Gives ( 8.7, 9.7, 9.8, 8.7)
then Outer Query
Select *
from Profesor P1
Where P1.rating > ALL(8.7, 9.7, 9.8) /* eleminate duplicate because it is Set of Value */
WIll Give as Output