SQL queries

To find out max salary

= and in does the same work but = expects the single record otherwise break.

Using sub query

    SELECT * FROM public.employee where salary = (select max(salary) from public.employee)

Using CTE

    with max_salaries as (
        select *, row_number() over(order by salary desc) as rn from employee 
    )
    
    select * from max_salaries where rn = 3

This site uses Just the Docs, a documentation theme for Jekyll.