Here is my table A.

```
| Id |  GroupId  |  StoreId  | Amount |
| 1  |    20     |     7     |  15000 |
| 2  |    20     |     7     |   1230 |
| 3  |    20     |     7     |  14230 |
| 4  |    20     |     7     |   9540 |
| 5  |    20     |     7     |  24230 |
| 6  |    20     |     7     |   1230 |
| 7  |    20     |     7     |   1230 |

```

Here is my table B.

```
| Id  |  GroupId  |  StoreId  | Credit |
| 12  |    20     |     7     |   1230 |
| 14  |    20     |     7     |  15000 |
| 15  |    20     |     7     |  14230 |
| 16  |    20     |     7     |   1230 |
| 17  |    20     |     7     |   7004 |
| 18  |    20     |     7     |  65523 |

```

I want to get this result without getting duplicate Id of both table.
I need to get the Id of table B and A where the Amount = Credit. 

```
 |  A.ID     |   B.ID    |  Amount |
 |    1      |     14    |   15000 |
 |    2      |     12    |    1230 |
 |    3      |     15    |   14230 |
 |    4      |     null  |    9540 |
 |    5      |     null  |   24230 |
 |    6      |     16    |    1230 |
 |    7      |     null  |    1230 |

```

My problem is when I have 2 or more same Amount in table A, I get duplicate ID of table B. which should be null. Please help me. Thank you.