© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
1 reply
Vasek

Converting `INNER JOIN` and `GROUP BY` to JS SDK

Hi, I'm trying to convert the following SQL query to the JS SDK equivalent but having very hard time
SELECT
  code_snippet_embed_telemetry.code_snippet_id cs_id,
  code_snippet_embed_telemetry.type action_type,
  COUNT(*) AS total
FROM code_snippet_embed_telemetry
INNER JOIN code_snippets on code_snippets.id = code_snippet_embed_telemetry.code_snippet_id
WHERE code_snippets.creator_id = 'string-that-will-be-passed-in-function'
GROUP BY cs_id, action_type;
SELECT
  code_snippet_embed_telemetry.code_snippet_id cs_id,
  code_snippet_embed_telemetry.type action_type,
  COUNT(*) AS total
FROM code_snippet_embed_telemetry
INNER JOIN code_snippets on code_snippets.id = code_snippet_embed_telemetry.code_snippet_id
WHERE code_snippets.creator_id = 'string-that-will-be-passed-in-function'
GROUP BY cs_id, action_type;


Especially the INNER JOIN and GROUP BY part. Can anyone give me some hints?
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

JS inner join match single row?
SupabaseSSupabase / help-and-questions
4y ago
Supabase JS-RC8 Inner Join Types
SupabaseSSupabase / help-and-questions
4y ago
Order by in js sdk
SupabaseSSupabase / help-and-questions
4y ago
does the python sdk support group_by and aggregate?
SupabaseSSupabase / help-and-questions
2mo ago