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?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!