I'm sure this is a common question but I cannot find the answer. I want to query a separate table called users and check if they have property is_moderator = true.
(EXISTS ( SELECT 1
FROM users
WHERE ((users.user_id = auth.uid()) AND (users.is_moderator = true))))
I tried to delete users.user_id = auth.uid() just to check if any users have is_moderator and it still does not work.
It's as if it isn't even querying the users table .
Any help is appreciated.
