Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- d.DEP_NAME, sq.LAB_CNT
- FROM DEPARTAMENT d,
- (SELECT
- d.DEP_ID, COUNT(*) AS LAB_CNT
- FROM
- LABORING l,
- DEPARTAMENT d
- WHERE l.DEP_ID = d.DEP_ID
- GROUP BY d.DEP_ID
- HAVING COUNT(*) <= 3) sq
- WHERE d.DEP_ID = sq.DEP_ID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement