cheshire137 / competiwatch

Web app to track and visualize your competitive match history in Overwatch.
MIT License
17 stars 4 forks source link

Store heroes played in matches table #73

Closed cheshire137 closed 6 years ago

cheshire137 commented 6 years ago

This is like #71 but for heroes_matches instead of match_friends.

cheshire137 commented 6 years ago

SQL to run before:

SELECT match_id, ARRAY_AGG(hero_id ORDER BY hero_id) AS hero_ids FROM heroes_matches GROUP BY match_id ORDER BY match_id;

SQL to run after:

SELECT id AS match_id, hero_ids FROM matches WHERE hero_ids <> '{}' ORDER BY match_id;