1. A computer system comprising: multiple peer computers, comprising a first peer and a second peer; and a tangible, non-transitory computer readable storage media storing logic instructions that are executable by the first peer to cause the first peer to: instantiate a collaborative correlated query process (CQP) template, the collaborative CQP template defining multiple roles and multiple query steps, each of the multiple query steps being executable by one of the multiple peer computers, wherein each of the multiple peer computers is assigned one of the multiple roles, and wherein the first peer is assigned a first designated role of the multiple roles; receive a correlated query being divided into the multiple query steps and being configured in accordance to the collaborative CQP template; configure the correlated query to include a relation valued function (RVF), the RVF comprising a function that receives a list of relations as an input and returns a relation as an output upon executing the function; execute one of the multiple query steps that belongs to the first designated role and skip other query steps in the multiple query steps; and communicate a message to indicate completion of the one of the multiple query steps.