order by does not work in a function - Supabase