title: How to get products from order, order entries, and orders status from query
body: <p>I prepared a flexible search query. Here, I developed a condition like:</p>
  <ol>
  <li><p>Order status is completed in orders</p>
  </li>
  <li><p>And order entries which are present in order</p>
  </li>
  <li><p>Getting products which are in orderentries</p>
  </li>
  </ol>
  <p>For this I wrote a query</p>
  <pre><code>select {p.pk} from {
    order as o 
    join OrderStatus as os on {os.pk}={o.status}
    join orderentry as oe on{oe.order}={o.pk}
    join product as p on {oe.product}={p.pk}
  }
  where {os.code}='COMPLETED' 
  AND {o.date}&gt;'2020-08-16 00:00:00.000' AND{o.date}&lt;'2020-09-30 00:00:00.000' 
  group by{p.pk} order by count({oe.pk}) desc limit 10
  </code></pre>
  <p>here in this query what I want is I want to get all product information like</p>
  <pre><code>select * from Product}
  </code></pre>
  <p>How to modify this query get all products?</p>