I have the following two tables:
auth_user
- id
- username
- is_active (boolean)
…
useprofile_userprofile
- id
- user_id
…
How would I find all auth_user objects where is_active=0 and there is no userprofile_userprofile object with that user_id? For example, an entry like this —
auth_user
- id = 1
- username = hello@gmail.com
- is_active = 0
and userprofile_userprofile has no object where user_id = 1
1 Answer