Reputation: 47
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;
Upvotes: 0
Views: 2817
Reputation: 1841
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.
Upvotes: 1