select iproductid,caccount,count(caccount) as cnt from customer c group by iproductid,caccount having count(caccount)>2 order by iproductid,cntThis gives me results like
iproductid caccount cnt ----------- ------------------------------ ----------- 1 xxx 3 1 yyy 3Now I want another column that tells me "of those customers using the same credit card, how many have the same last name?"