Best way to perform complex queries? - Supabase