[Solved-1 Solution] Pig Order By Query ?
What is Order By ?
ORDER BYoperator is used to display the contents of a relation in a sorted order based on one or more fields.
- Given below is the syntax of the
- Now, from here we want the following output :
- Basically, we want to sort on the numbers : 10,9,16 and select the top 2 for every row.
How can we do it?
- We can use the nested foreach with
ORDER BYlike below code