How do I aggregate multiple rows of a joined table in SQL? - Supabase