AggregateColumns must not be null or empty

I'm trying to do create the below statement in a Query Entity. (see attached)

"select int_field, text_field from table_name where date_field = (select MAX(date_field) from table_name where id = id)"

I think I'm missing something as it's complaining about aggregatecolumns must not be null or empty.



query entity.txt

OriginalPostID-228561

OriginalPostID-228561

  Discussion posts and replies are publicly visible

Parents
  • Yes Bhanu. I believe the above query

    "select int_field, text_field from table_name where date_field = (select MAX(date_field) from table_name where id = id)"

    which was given can be simplified using the sorting on date field in descending order so that required row will be picked up.

    second option could be to split this into two rules - one for the aggregation and second for the selection and then use the aggregate rule in the filter condition.
Reply
  • Yes Bhanu. I believe the above query

    "select int_field, text_field from table_name where date_field = (select MAX(date_field) from table_name where id = id)"

    which was given can be simplified using the sorting on date field in descending order so that required row will be picked up.

    second option could be to split this into two rules - one for the aggregation and second for the selection and then use the aggregate rule in the filter condition.
Children
No Data