How do I select only x number of rows per group in a db2 sql query? For instance, I'm group records by company and division. I only want to retrieve 5 records for each division within each company. If I use "Fetch first 5 rows only", it limits the overall query results to 5 records. Is thera a way to get 5 records for each group?
September 1, 2005 2:00 PM
September 2, 2005 2:14 PM