How to filter with AND logic with `has many` relation?

I have resolved this. maybe this can help others