Selecting field from all comments on a particular node I have essentially hacked comments into reviews of a node, having a comment field of 'rating' with a fivestar widget. I was hoping it would be a trivial call to the voting API to fetch the rating of each 'review' so I could work out a nodes average rating. 

However I notice that for some reason all the votes are getting saved in a database table of field_revision_field_product_rating, and this contains no direct foreign key to the node it is from, is there a 'Drupal' way of fetching the comments in manual SQL with some monster joins?

Just to confirm, review is actually a comment, and the fivestar 'rating' is a field on the comment.

Bonus points: Why, even though I'm using fivestar, are the votes not getting put into the votingAPI storage?
On the field settings screen, it is important to set the “Voting
target” to “Parent node,” so that these votes will add ratings to the node; then,
click the “Save field settings” button