Get n records grouped by a certain field
Date: Fri, 11 Dec 2009 07:25:42 -0800 (PST)
Let's say I have the canonical employee table. Let's say I have a
Let's say that there are 1000+ employees in each department.
Can it be done via sql that I need to see, say 10 employees from each department?
select emp_last_name, dept_id
(but only fetch 10 employees for each department and I do want all departments selected).
Hope that makes sense.
Sashi Received on Fri Dec 11 2009 - 09:25:42 CST