The following code will give you all products which sold more than 5 units during the last 100 days.
{% assign date = globals.site.dateNow | date_add: -100, "day" -%}
{module_data resource="products" version="v3" fields="id" limit="100" where="\{'orders.units':\{'$gt':'5'\},'orders.createDate':\{'$gt':'{{date}}'\}\}" collection="units"}
<pre>{{units|json}}</pre>
You can then use the product IDs like so and render the products
{% for item in units.items -%}
{module_data resource="catalogproducts" version="v3" limit="1" fields="productId,catalogueId" where="\{'product.id':'{{item.id}}'\}" order="catalogueId" collection="products"}
{% for item in products.items -%}
{% assign CATID = {{item.catalogueId}} -%}
{% assign PROID = {{item.productId}} -%}
{module_product,{{CATID}},{{PROID}}}
{% endfor -%}
{% endfor -%}