I have two select statements that find the maximum salary for a specific role. Now I want to have the maximum of the two returns of those select statements. Think about the following code:
SELECT MAX(SALARY)
FROM TABLE1
WHERE ROLE = 'MANAGER'
SELECT MAX(SALARY)
FROM TABLE1
WHERE ROLE = 'DEVELOPER';
At the end I want the maximum of these two numbers.
How would I do all this in one query?
Have two selects for maximum, then compare those maximums and give the maximum of the two maximums?