Can this query be written in Supabase? - Supabase