I have to check if any book id and/or book code is a duplicate for a unique StudentVisitId and it should return a single row. If a duplicate is found, then it should return 0 else 1.

**Data:**

```
BookID  StudentVisitId  BookCode    ListOrder
42568   4531            B1162       3
42568   4531            B1162       2
64532   4531            B1178       2
64532   4598            B1178       3
76543   4622            B1178       2
64532   4622            B1178       1

```

**Expected output:**

```
StudentVisitId  DuplicateEntry
4531            0
4598            1
4622            1

```

`0` indicates `StudentVisitId` `4531` is a duplicate for `BookId` `42568` and `BookCode` `B1162`.