How can I turn this SQL into Supabase-js query? - Supabase