Wednesday, June 29, 2011

test

select p1.Group, p1.Sub_group, count(p1.personid)

from prod1 p1,
(select Group, sub_group
from prod1
MINUS
select Group, sub_group from prod2) p2

where p1.Group = p2.Group
and p1.sub_Group = p2.sub_Group

group by p1.Group, p1.Sub_group

No comments: