def mergeQuery(self, query, how=None):
        self.mergeSELECT(query)
        self.mergeWHERE(query, how)
        self.mergeGROUPBY(query)
        self.mergeORDERBY(query)

        if self.OFFSET is not None and query.OFFSET is not None:
            raise RuntimeError("Multiple slicing asked")

        if self.OFFSET is None:
            self.OFFSET = query.OFFSET

        if self.LIMIT is not None and query.LIMIT is not None:
            raise RuntimeError("Multiple slicing asked")

        if self.LIMIT is None:
            self.LIMIT = query.LIMIT