title: get a new output by mixing 2 queries
body: <p>I have one query that output me a list of companies, their permits, and their permit start date. I have another list that output me a lot of companies, with let's say, all the activities '01' and their date. I would like to mash these 2 to get the results of every company that had activities '01' before the start date of their permit.</p>
  <p>So I should see in my output query for example:</p>
  <p>Company that had activities '01' ONLY before the start date of their permit.</p>
  <p>Is it possible?</p>