Figured it out myself. Apparently Supabase can't handle duplicate column names. After declaring them explicitly and giving aliases the query worked as intended