How to do this query with supabase postgreSQL ?
SELECT Words.word, COUNT(audios.id) AS count
FROM Words
LEFT OUTER JOIN audios ON audios.word_id = words.id
GROUP BY words.id ORDER BY count DESC;
You would create a Postgres function and then call it with the .rpc
method of the supabase-js library. You can read more about this in the documentation.