i did , still wrong ,here is the query

select cid, ctype, count(*) from cust
and ctype in ( 'P', 'A') group by cid, ctype
having ctype in ( 'P', 'A')