S
|
steveh 5/21/2008 |
Yes but in a messy way, something along the lines of:- |
V
|
vytb author 5/22/2008 |
Yes but in a messy way, something along the lines of:- select max(a),b from mytable,(select max(a) maxa,b from mytable group by <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=29609&image=1&table=forumreplies' class='bbc_emoticon' alt='B)' /> z where mytable.a<z.maxa and mytable.b=z.b group by b
|
S
|
steveh 5/23/2008 |
Just keep extending the above, but you'll get to the point where there are so many subselects that if you've a lot of data then you'll have an issue. |
V
|
vytb author 5/23/2008 |
Just keep extending the above, but you'll get to the point where there are so many subselects that if you've a lot of data then you'll have an issue. Depending on your database and the number that you have, you may be better selecting the keys then selecting top 10 x from mytable where y=nnn order by x desc
|