How to show votes in view results by node id? I installed the modules "rate (voting widget)" and "voting api". These modules work very well. 
I use views to get a list of nodes, and I added the voting results. Now I get a row for each vote, not for each node...

Views rows:

Node 1  --  angry: 1  happy: 1
Node 1  --  angry: 1  happy: 1

Node 2  --  angry: 1  happy: 0

Node 3  --  angry: 0  happy: 1


I want to group the results by node id, but this doesn't seem to work. what would be the easiest solution for this problem?
You can use hook_query_alter() in your custom module. Your code should look like this:

function MODULENAME_query_alter(&amp;$query) {
  if(!empty($query-&gt;alterMetaData['view']-&gt;name) &amp;&amp; $query-&gt;alterMetaData['view']-&gt;name == 'VIEWNAME'){
    $query-&gt;groupBy("node.nid");
  }
}