-- OK this works fine if I want to extract maxmum value from
-- group and by taht I mean that there is data such as departments and tehre are
-- veriuos salaries in those departments so MAX extracts the biggest one from each group
-- in this case DEPARTMENT_ID and that's it
-- But what if I want to find single individual(s) with highest sallary?
SELECT DEPARTMENT_ID, MAX(SALARY)
GROUP BY DEPARTMENT_ID;
-- and to dispaly his/her/their name and ID?
-- WITHOUT using JOIN just with selects or nested selects?
-- With following query MAX function displays ALL employess wityh their salaries
SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME, MAX(SALARY)
GROUP BY EMPLOYEE_ID, FIRST_NAME, LAST_NAME;