How to get unique rows based on one column

0
Hi, I am trying to get unique data rows based on year 2018 and 2019 column and domain model is:  and my page contains data grid as data source is microflow and  can someone help me to get unique rows data based on Year column
asked
1 answers
0

Your question is a bit unlikely, but you say you want a list of Entity-object with the attribute Year being unique. This will result ni only two object in the list, one having year being 2018, one having year being 2019. Easiest way to get that is this OQL

FROM YourModule.Entity e
GROUP BY e.Year
SELECT e.Year

If you want any value for Date and Month, you will have to add them behind SELECT e.Year and you need them to be grouped or summed or ‘take first’.

answered