How do I get the vote result in Vote API? I have installed the rate module, and found out that the votes associated to a node are stored in the votingapi_vote table.
Is there a function to use to get the sum of all the votes for a node?
As you have installed the Rate module, then you can use the function rate_get_results(), which can be called as rate_get_results('node', $nid, $widget_id); $nid is the node ID of the node for which you want to get the result, and $widget_id is the identifier of the widget used to cast the vote.
The result is an array that contains many values (some of them are present only for a particular widget); in particular $output['rating'] is the rating, and $output['count'] is the number of the votes.
If the widget saves the sum of the votes, then $output['rating'] (where $output contains the result returned from rate_get_results('node', $nid, $widget_id)) contains the sum of the votes, which is what you are looking for.