I'm trying to figure out how to sort query results using supabase to do something like this:
await supabase.from("groups").select('*, items(id)').order('count(items)');
Basically, sort resulting groups by the number of associated items (group has many items) descending, and return those items alongside group information.
Any pointers for how to structure the select
to do this? I'm having trouble as docs aren't that helpful, so it's likely something I'd need raw sql for.