I have this data ```id name order_field cou...
# troubleshooting
a
I have this data
Copy code
id    name    order_field country
100   abc     1           ABC
101   def     1           DEF
100   abc     2           GHI
Now if I group by
Copy code
Table
  .groupBy($("id"), $("name"))
I might get
Copy code
id    name    order_field  country
100   abc     2,1          GHI, ABC
101   def     1            DEF
Now I want
Copy code
id    name    order_field  country
100   abc     1            ABC
101   def     1            DEF
Basically I want to order by order_field and then get the first result. How can I do this in Table API in flink?
Copy code
callSql("ROW_NUMBER() OVER (PARTITION BY id,name ORDER BY order_field ASC)").as("rank")
The only way I found was doing this but I dont want to use SQL query. I want to do this in Table API in java code. Can someone help?