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;


Especially the INNER JOIN and GROUP BY part. Can anyone give me some hints?
Was this page helpful?