I have a table named content
content has content_id, android_id and user_id
content_id | android_id | user_id
a1 | b1 | c1
a1 | b2 | c2
a1 | b3 | c1
a1 | b4 | c3
a1 | b1 | c4
a2 | b2 | c1
I want to select count of distinct android_id and user_id for a specific content_id
(if a specific android_id has appeared in any of rows, it should not appear in any other row even if its user_id is distinct; similarly for user_id i.e. no two user_id in any of selected rows should match)
i.e. for content_id=a1, following rows should be selected
a1 | b1 | c1
a1 | b2 | c2
a1 | b4 | c3
i.e. b1,c1,b2,c2,b4,c3 is mutually distinct and didn't appear in any of multiple rows
I want MYSQL Query. Thanks