Example of TQL
Select all messages sent to ‘Joe’ and ‘Mike’, and whose subject field or the body contained the word ‘CS294-7’, and to which none of them has sent a reply, and which has been endorsed by somebody.
m.to = {‘Joe’, ‘Mike’} AND
(m.subject LIKE ‘%CS294-7%’ OR
mreply.sender=‘Mike’) AND
mreply.in_reply_to = {m}) AND
EXISTS (a: a.type=‘endorsement’ AND