I am trying to retrieve the name and surname of customers that I have more than 1 friends by counting the occurrence of their in the friend's table. That friend table that only shows the friend\_id and the cust\_id and the location\_id, I also have to mention that I have a location table that has all details about the locations. but unfortunately I have that operand issue mentioned at the top;
Can someone explained to me clear what I have to do, why my query is wrong. I have looked at something similar still dont get the logic behind it. Please do not refer to another answer, and if you think this question is too basic, please dont comment;

```
select* from customer 
where custid in (select custid, count(custid) as occ from friend group by 
custid having occ >=2);

```