A dQSQ query has the following format:
q@P(x) :- ancestor@P("Lois", x)

This query computes all the ancestors of "Lois", assuming the ancestor relation is defined on peer P, and that ancestor("a", "b") means that "a" is an ancestor of "b". The result of the query is added to relation q.