HI I HAVE SMALL DOUBT ON THIS QUERY

SELECT pid,
ccode,
status,ANBR
FROM (
SELECT a.pid,
a.ccode,
a.groupid,
b.status,
B.ANBR

FROM tproductaccount b,
group a
WHERE a.groupid = b.groupid
AND a.companyid = '10540'
AND b.traderid = '10600'
)





IF I EXECUTE THE ABOVE QRY THEN IT GIVES THE FOLLOWING OUTPUT.


PID CCODE STATUS ANBR
---- ---------- - --------------------
1001 AUD Y 10000000000000000003
1001 GBP Y 100601
1001 YEN Y 10000000000000000003
1001 YEN Y 10000000000000000004
1001 YEN N 100601
--------------------------------------------------------------

BUT WHAT I REQUIRE IS THE FOLLOWING

PID CCODE STATUS
---- ---------- -
1001 AUD N
1001 GBP N
1001 YEN N


BCAZ FOR "AUD" AND "GBP" CURRENCY ONLY ONE ACCOUNT IS EXISTING THAT IS 100601 AND
10000000000000000003 SO THE STATUS SHOULD
RETURN AS 'N' EVEN THE STATUS IS 'Y'.AND AMONG OTHER ACCOUNT RECORDS ANYONE STATUS IS 'N' THEN IT SHOULD RETURN 'N'