Sorry for posting this question again. I rephrased my question a little bit.
I am trying to write a query to return rows from Table-A where multiple rows found in Table-B with STATUS = 1 for each CID column from Table-A.
So in this example CID 100 has two records found in Table-B and STATUS = 1. So I want to write a query to return this row from Table-A. I know this is a weird table design. Please help.
Here are the tables with sample data.
Table-A
----------------------------------------- 
AID                Name          CID 
--------------------------------------- 
10               test1           100     
12               test1           100 
13               test2           101
14               test2           101
15               test3           102
Table-B 
------------------------------------ 
bID             AID          status
----------------------------------- 
1                 10             1
2                 12             1
3                 14             1
4                 15             1
 
     
     
     
     
    