© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
2 replies
guidsen

Help with query via the client API

I'm trying to convert this PostgreSQL query to PostgREST or the client API, but cannot find any good resources on nested WHERE constraints for example.

SELECT *
FROM records AS r
JOIN cells AS c ON r.id = c."recordId"
WHERE 
      (c."columnId" = '6c037d08-2e4f-489b-ba1a-89b60007954b' AND c."data"->'value'->'result'->>'city' LIKE '%Ams%')
  AND (c."columnId" = '6c037d08-2e4f-489b-ba1a-89b60007954b' AND c."data"->'value'->'result'->>'city' LIKE '%TH%')
;
SELECT *
FROM records AS r
JOIN cells AS c ON r.id = c."recordId"
WHERE 
      (c."columnId" = '6c037d08-2e4f-489b-ba1a-89b60007954b' AND c."data"->'value'->'result'->>'city' LIKE '%Ams%')
  AND (c."columnId" = '6c037d08-2e4f-489b-ba1a-89b60007954b' AND c."data"->'value'->'result'->>'city' LIKE '%TH%')
;


I want the above to be converted to client API.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Should I pass token from client to API (Which will use Supabase) via Query Parameters?
SupabaseSSupabase / help-and-questions
4y ago
How to filter main query using subqueries via JS Client?
SupabaseSSupabase / help-and-questions
3y ago
Help: Any way do query via pgvector operators AND supabase client js in frontend?
SupabaseSSupabase / help-and-questions
5mo ago
Server side auth via the supabase React client
SupabaseSSupabase / help-and-questions
4y ago