trane-dev/Trane

Add having in prediction problem generation

PatrikDurdevic opened this issue · 0 comments

In the store dataset, the target entity is orderlines.

Currently, we can generate a problem like

  • Predict the number of records with <products.price> greater than 22.99 in next 1m days
  • SELECT count(*) from orderlines inner join products where products.price > 22.99

Which basically predicts how many individual products with a price > 22.99 will be ordered in a month.

With a having operation, we would be able to generate problems like

  • Predict the number of records having average <products.price> greater than 22.99 in the next 1m days
  • SELECT count(orderlines.orderid) from orderlines inner join products group by orderlines.orderid having avg(products.price) > 22.99

Which predicts how many orders there will be such that average product price in each order is > 22.99 in a month.