© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
Carl Assmann

Filter Posts based on Labels, but still receive all Labels (inner join)

I have a posts table and a labels table. One post can have many labels.

In a query like this:
supabase.from("posts").select("*, labels(*)")
supabase.from("posts").select("*, labels(*)")
I receive all posts and all of their labels. Now, when I want to see posts with
label 1
label 1
, the query will look like this:
supabase.from("posts").select("*, labels!inner(*)").eq("labels.id", 1)
supabase.from("posts").select("*, labels!inner(*)").eq("labels.id", 1)
. But now I don't receive every label of each post anymore. I only get
label 1
label 1
, since the other labels don't pass the filter.

Is there a way to get every post, that has
label 1
label 1
while still receiving every other label?
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

Filter inner joins
SupabaseSSupabase / help-and-questions
4y ago
Typescript Type declaration on Inner Join?
SupabaseSSupabase / help-and-questions
4y ago
inner join really slow
SupabaseSSupabase / help-and-questions
4y ago
Inner Join in Dart
SupabaseSSupabase / help-and-questions
4y ago