I want a query to return the list of users where all records associated with their id satisfy some requirement.
For example, given this simple data set:
id | data
1 d
2 a
1 c
3 c
3 b
How can I query to get the list of ids where data is never 'c'? A simple query of data not 'c' would return [1, 2, 3], but I would only want to receive [2].
Is there a simpler way than querying for all instances where data IS 'c', and then inverting the id list by performing a second query for all ids $nin the first list?