I have the following table:
-----------------------------------------
xDate xItem xCount
-----------------------------------------
2018-01-01 A 100
2018-01-01 B 200
2018-01-01 D 500
2018-01-02 C 200
2018-01-02 E 800
I want to select TOP 2 value for each date on the MAX value of xCount field. So, the result should be:
-----------------------------------------
xDate xItem xCount
-----------------------------------------
2018-01-01 D 500
2018-01-01 B 200
2018-01-02 E 800
2018-01-02 C 200
Does anyone have an idea for this case?
Cheers,