Back to
Latest changes:
2020/01/13 19:15

This is an old revision of the document!


HAVING and GROUP BY clauses in generated query

  1. When user inserts some aggregate column into the query - EasyQuery automatically adds GROUP BY clause into the result SQL statement. To add an aggregate column - just add a column into QueryColumnsPanel as usual, then click on the button near newly added column and select “Aggregate” in the menu that appear.
  2. To add HAVING clause into the result query you can do the following:
    • Add special virtual attribute into your data model with expression “Max(TableName.ExamDate)”.
    • Mark this new attribute as “Aggregate”.
    • Assign to this attribute some operators (equals, less then, more then, etc).
    • Save your model.

Now when user add some condition with this new attribute - the condition will go into HAVING clause in the result SQL statement;

Discussion

Enter your comment: