Quick and dirty statistics using relational algebra in node.js