Hi, i mean in filtering list data source or drop down filed data source (like blow picture) I need to distinct result:
I think i should use sub query some how to distinct my result, but it is not clear for me , how to do that exactly in situations that filtering cause duplication in part of data (not hole row).
for example , let assume i have relation that hold these data:
log_id ,
employee_name
related_department,
...
and filtering on relation result like these :
1, john , dep_a, ..
1, john, dep_b, ..
2, marry, dep_, ...
now let assume i only show employee_name in drop-down ,so john will appear towice in dropdown.
by adding a sub query to fetch max(employee_name ) for each login_id and make it equal to employee_name in main filter, I think problem should be solved.
but in complicated query filter may be it is needed to repeat the main query in sub query to use aggregation to distinct data. also to aggregate on more than one column, i need to add another sub-query, is it right ?
is it the only and right approach to distinct data ?
Can you please bring me an example of how to distinct data by using aggregation in filter?
(another way is to get all duplicated in data sub-query and in main query add condition to get data from main relation by setting required attribute of relation ANY= equivalent attribute in sub- query)