Skip to content

Commit

Permalink
fix(movie): duplicate genres on multiple watches
Browse files Browse the repository at this point in the history
  • Loading branch information
believer committed Apr 28, 2024
1 parent 3eaa122 commit 01c3f30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ SELECT
m.overview,
m.tagline,
r.rating,
ARRAY_AGG(g.name) AS genres
ARRAY_AGG(DISTINCT (g.name)) AS genres
FROM
movie AS m
INNER JOIN movie_genre AS mg ON mg.movie_id = m.id
Expand All @@ -88,7 +88,7 @@ GROUP BY
SELECT
m.*,
r.rating,
ARRAY_AGG(g.name) AS genres
ARRAY_AGG(DISTINCT (g.name)) AS genres
FROM
movie AS m
INNER JOIN movie_genre AS mg ON mg.movie_id = m.id
Expand Down

0 comments on commit 01c3f30

Please sign in to comment.