The Quantity Based Aggregation (QBA) policy is very simple, yet understudied by the scientific community. The QBA policy can be stated as follows: given a set of sensitive objects, no more than a limited number of these objects should be disclosed. In [1], [2], the authors defined a QBA control model for relational databases supporting projection-selection queries on single relations. In [3]-[6], the authors defined a QBA control model for (cadastral) graph databases supporting point & click queries. The work we present in this paper can be seen as both an interpretation for graph datasets of the model defined in [1], [2] and a generalization of the model defined in [3]-[6] to arbitrary queries. We use Prolog to specify and develop a prototype our model.