Hello, just started to use supabase today and I am...
# sql
m
Hello, just started to use supabase today and I am not quite understanding how it works when you are joining tables with or without foreign keys. I have the data model as in the image and I want to get all galaxies a user is subscribed to. So the SQL I want to do is: select name from galaxies inner join subscriptions on galaxies.id = subscriptions.galaxy_id where subscriptions.user_id = '74c5deb6-ac02-4b3c-bad4-d7b775fde8af' my attempt at doing this in flutter looked like final res = await _client .from("galaxies") .select("name, subscriptions(user_id)") .eq("subscriptions.user_id", uid) .execute(); But then I get all names of excising galaxies with the user_id if it matches. If someone could point me in the right direction to translate with SQL to flutter query I would be greatful. 🙂