SupabaseS
Supabase2mo ago
Thijs

[SOLVED] Need help with RLS/SQL

I have 4 tables:
  • userprofile
  • blog (part of a user)
  • posts (part of a blog)
  • likes (part of a post)
There are 2 scenario's:
  1. I am following a blog of the user: Now I want to see this blog appear on their profile
  2. I am not following a blog: now I do not see any blogs, this should be private.
BUT, I should ALWAYS be able to see the total amount of likes, blogs and posts the user has.

What whould be the best approach to achieve this?
Was this page helpful?