What you are trying to do is select a number of records per group. This can be done by using variables in your query similar to this:
select *
from
(
SELECT sid,
state,
votes,
@prev := @curr,
@curr := state,
@rank := IF(@prev = @curr, @rank+1, 1) AS rank
FROM
(
select t1.sid, state, votes
FROM table1 t1
INNER JOIN table2 t2
ON t1.sid=t2.sid
) src, (SELECT @curr := null, @prev := null, @rank := 1) r
ORDER BY state, votes desc
) src
where rank <= 2
order by state, votes;
See SQL Fiddle with Demo
There are other ways to do this which are outlined here:
Using LIMIT within GROUP BY to get N results per group?