Postgresql – can you explain the logic of this query
I have this query that finds the name of the teacher with the 4-th highest salary. I don't understand this part SELECT COUNT (DISTINCT T2.salary) FROM teacher as T2 WHERE T2.salary > T1.salary ) = 3 from SELECT name FROM…