Need help with a MySQL query

Hey I’ll paypal someone $20 if they can help me figure out this query
Here are the important parts of my schema:

polls
===
id
user_id
title

users
===
id
name

votes
====
id
poll_id
user_id
timestamp

friends ( pivot table, both below are user id's )
====
user_id
friend_id

I need a query that will do the following:

get poll title, user name of voter, user name of poll creator from polls where users i am friends with voted, organized by vote timestamp. Thanks

is a good site for quickly playing around with something like this if you’re so inclined.

sqlfiddle code:

create table polls (id int(11), user_id int(11), title varchar(20));
create table users (id int(11), name varchar(20));
create table votes (id int(11), poll_id int(11), user_id int(11), timestamp int(25));
create table friends (user_id INT(11), friend_id int(11));

insert into polls (id, user_id, title) VALUES (1, 1, ‘poll number 1’);
insert into polls (id, user_id, title) VALUES (2, 1, ‘poll number 2’);
insert into polls (id, user_id, title) VALUES (3, 1, ‘poll number 3’);

insert into users (id, name) values (1, ‘user 1’);
insert into users (id, name) values (2, ‘user 2’);

insert into votes (id, poll_id, user_id, timestamp) values (1, 1, 1, 111);
insert into votes (id, poll_id, user_id, timestamp) values (1, 2, 1, 222);
insert into votes (id, poll_id, user_id, timestamp) values (1, 3, 1, 333);

insert into friends(user_id, friend_id) values (2, 1);

Query (assuming we’re running the query for user_id 2)

SELECT
p.id, p.title, p.user_id as pollCreatorID,
vn.id as voterUserID, vn.name as voterName,
pn.name as pollCreatorName
FROM polls p
INNER JOIN votes v ON p.id = v.poll_id
INNER JOIN users vn ON v.user_id = vn.id
INNER JOIN users pn ON p.user_id = pn.id
INNER JOIN friends fj ON vn.id = fj.friend_id
WHERE
fj.user_id = 2
ORDER BY v.timestamp

Pay me!

Results:

+ID—-TITLE————POLLCREATORID—-VOTERUSERID—-VOTERNAME—-POLLCREATORNAME+
————————————————————————————————|
|1—–poll number 1—–1——————1—————-user 1———user 1————–|
|2—–poll number 2—–1——————1—————-user 1———user 1————–|
|3—–poll number 3—–1——————1—————-user 1———user 1————–|
————————————————————————————————