© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4mo ago•
6 replies
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?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

need help with RLS policy
SupabaseSSupabase / help-and-questions
5mo ago
(solved) Realtime subscriptions not working with RLS?
SupabaseSSupabase / help-and-questions
4y ago
Need help understanding something RLS related
SupabaseSSupabase / help-and-questions
3mo ago
RLS - Help with Insert Policy
SupabaseSSupabase / help-and-questions
4y ago