I have below table
Id Stack
------------------
1 a
1 b
2 c
2 d
I want to get below table result.
Id Stack
------------------
1 a
2 c
I use DISTINCT but it doesnot work
how can I do it ?
are there any solution by using group by?
This query will give you result like this.
Now making the above query as subquery and getting the columns having
row_number=1will give the desire output you wanted.