Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mikechambers/0c5abd11529d22082f9027e997b64f45 to your computer and use it in GitHub Desktop.
Save mikechambers/0c5abd11529d22082f9027e997b64f45 to your computer and use it in GitHub Desktop.
get all medals associated with an activity id
const m = `SELECT
medal_result.reference_id,
count,
character_activity_stats as character_activity_stats_index,
activity.activity_id as activity_id
FROM
medal_result
INNER JOIN
character_activity_stats on character_activity_stats.id = medal_result.character_activity_stats,
activity ON character_activity_stats.activity = activity.id
WHERE
activity.activity_id IN (${activityIds.join(",")})`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment