Create a inline view with group by empno and put having sum(vac_days)<10 condition then join this with the table to get remaining fields.
Forum Rules