I have a tricky sql question. What I am tring to do, is group some data in a table by a user_id and then grab the top 2 rows for each user_id which I grouped. Is that possible?
MY_TABLE
========================
User ID Data
1 23 <--
1 20 <--
1 10
2 23 <--
2 20 <--
2 40
3 20 <--
3 40 <--
4 10 <--
<-- are the rows I want to return. Any help is greatly appreciated. Thanks,
Joe
MY_TABLE
========================
User ID Data
1 23 <--
1 20 <--
1 10
2 23 <--
2 20 <--
2 40
3 20 <--
3 40 <--
4 10 <--
<-- are the rows I want to return. Any help is greatly appreciated. Thanks,
Joe