Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- l.LAB_NAME,
- l.SALARY,
- d.DEP_NAME
- FROM
- LABORING l,
- DEPARTAMENT d,
- (SELECT
- MAX(l.SALARY) AS SALARY_MAX
- FROM
- LABORING l,
- DEPARTAMENT d
- WHERE l.DEP_ID = d.DEP_ID
- GROUP BY l.DEP_ID) sq
- WHERE l.SALARY = sq.SALARY_MAX
- AND l.DEP_ID = d.DEP_ID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement