Skip to content

Commit

Permalink
Remove extra condition on join that was causing calculation error
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeaufort committed Jun 11, 2018
1 parent b0b6b2b commit 1a3990b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data/migrations/V0084__fix_ofec_candidate_totals_mv.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
Addresses #3196
Addresses #3196 and #3200
Fix doubled totals for off-year special election candidates
#3196: Fix doubled totals for off-year special election candidates
#3200: Fixes missing off-year special candidates
- Recreate ofec_candidate_totals_mv
- Recreate two dependent views:
Expand Down Expand Up @@ -245,8 +246,8 @@ CREATE MATERIALIZED VIEW ofec_candidate_totals_with_0s_mv AS
FROM ofec_candidate_history_mv cand
LEFT JOIN ofec_candidate_totals_mv totals
ON cand.candidate_id = totals.candidate_id
AND cand.candidate_election_year = totals.election_year
AND cand.two_year_period = totals.cycle;
--Removed overly restrictive join that was preventing some candidates from appearing

--Permissions-------------------

Expand Down

0 comments on commit 1a3990b

Please sign in to comment.