I have below scenario:
Ref_ID Status
1 A
1 B
1 C
2 B
2 C
3 Null
4 B
5 B
I need only those Ref_ID which never gone through status A and C. Only need those Ref_IDs which never had any status or only had “B” status associated with it.
Output:
Ref_ID Status
3 Null
4 B
5 B
Not able to write the MongoDB query.
New contributor
UTKARSH GUPTA is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.