Top Earners

  • + 2 comments

    I wanted to use rownum (Oracle) and came with sth like:

    select * from
        (select earn, count(name) from 
            (select months*salary earn, name from employee)
        group by earn order by earn desc)
    where rownum = 1;
    

    Could it be simplified somehow? What do you think?