top N with respect to day and other field

I have a little problem building a query which selects top-N tuples with
respect to day and an other field.

Tha base table contains aggregated data for a web server, there are
different directories with pages inside and hits and this is aggregated
for a whole day for each directory (which is represented by a foreign
key) and for each page (also a fk).
This base table might, for example, look like
c_date lup_page lup_dir num_hits