Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
Supabase: filter rows based on if any of their one to many relations has property

In supabase I have a list of tracks and each track can have multiple artists (kept in a separate table). I only want tracks in which at least one of the artists associated with that track contains a certain property, we'll say their genre has to equal rap.

  tracksWithAtLeast1ArtistWhoseGenreIsRap = await supabase
      .from("tracks")
      .select("name, artists ( genre ), id")
      .filter("artists.genre", "eq", "rap")

here is what i'm workin right right now but the issue is that I think this filters the selected artists within each track by genre rather than filtering the tracks based on if any of its artists has the genre "rap".

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!