SQL server: get extra rows when trying to join the same table when creating a view

We have a table that obtains the imported data to an Excel file.

I'm creating a view of that table, joining the table itself and adding a rownumber column. Unfortunately, I get two additional rows when I run the sql command and I can not figure out who to get rid of or if there is a better solution for adding the number of records / joining the tables.

The original table has a row for each candidate, yes and no, tried to join them, so yes and do not appear in the same row for the district / contest.

SELECT CAST (ROW_NUMBER () OVER (ORDER BY
(SELECT 1)) AS INT) AS ID, t. *
FROM (SELECT DIFFERENT
a.PRECINCT_NAME, a.CONTEST_FULL_NAME, CAST (a.BALLOT_CAST AS INT) AS & # 39; BALLOT_CAST & # 39 ;, a.CANDIDATE_FULL_NAME AS & # 39; CANDIDATE_1 & # 39 ;, a.PARTY_CODE AS & # 39; PARTY_CODE_1 & # 39 ;, CAST (a.VOTE
LIKE # VOTECOUNT_1 & # 39 ;, b.CANDIDATE_FULL_NAME AS & # 39; CANDIDATE_2 & # 39 ;, b.PARTY_CODE LIKE & # 39; PARTY_CODE_2 & # 39 ;, CAST (b.VOTE_COUNT AS INT) LIKE & # 39; VOTECOUNT_2 & # 39;
FROM dbo.Election_Special to JOIN
dbo.Election_Special b ON a.PRECINCT_NAME = b.PRECINCT_NAME
WHERE (a.CANDIDATE_FULL_NAME = & # 39; Yes & # 39;) AND (b.CANDIDATE_FULL_NAME = & # 39; No & # 39;)) AS t
Actual output:
PRECINCT NAME | COMPLETE NAME COMPETITION | CANDIDATE 1 | VOTE 1 | CANDIDATE 2 | VOTE 2
SECTION 1 | CONTEST 1 | Yes | 3 | NO | 3
PRECINCT 2 | CONTEST 2 | Yes | 6 | NO | 4
PRECINCT 3 | CONTEST 3 | Yes | 7 | NO | 5
PRECINCT 4 | CONTEST 1 | Yes | 1 | NO | 7
PRECINCT 4 | CONTEST 2 | Yes | 6 | NO | one
PRECINCT 4 | CONTEST 1 | Yes | 0 | NO | 0
PRECINCT 4 | CONTEST 2 | Yes | 0 | NO | 0
SECTION 5 | CONTEST 3 | Yes | 3 | NO | 4


Expected performance
PRECINCT NAME | COMPLETE NAME COMPETITION | CANDIDATE 1 | VOTE 1 | CANDIDATE 2 | VOTE 2
SECTION 1 | CONTEST 1 | Yes | 3 | NO | 3
PRECINCT 2 | CONTEST 2 | Yes | 6 | NO | 4
PRECINCT 3 | CONTEST 3 | Yes | 7 | NO | 5
PRECINCT 4 | CONTEST 1 | Yes | 1 | NO | 7
PRECINCT 4 | CONTEST 2 | Yes | 6 | NO | one
SECTION 5 | CONTEST 3 | Yes | 3 | NO | 4