Skip to content

Instantly share code, notes, and snippets.

@sandyGanoti
Last active September 5, 2018 09:32
Show Gist options
  • Save sandyGanoti/1393126db0e72dcf1e26c35473bbdfbd to your computer and use it in GitHub Desktop.
Save sandyGanoti/1393126db0e72dcf1e26c35473bbdfbd to your computer and use it in GitHub Desktop.
put all user_ids that belong to a specific contest, to a specific leaderboard -- (no duplicate users)
insert ignore into scoregroups.user_leaderboard(user_id, leaderboard_id) select distinct(pickem_entry.user_id), "<leaderboard_id_HERE>" from pickem.entry as pickem_entry where pickem_entry.contest_id=<contest_id_HERE>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment