Thank you for your replies, I realy appreciate your help. But I see now that my question was not clear enought. My problem goes one step further, and i forgot to mention one crucial part.
I want to select the last x records per category. That "x" must be a constant. For example, I want (for every category, the last posted records.
category 1:
record 24
record 22
record 17
category 2:
record 25
record 23
record 19
category 3:
record 18
record 15
record 12
etc...
I'm sorry that my question was not complete. I'm working on this problem for some time now. I know there is a very simple way to do this with multiple queries. But this time I realy want to optimize my scripts, therefor it would realy be nice to do this one with one query. But I'm not sure if it is possible.