Question4Replies403Views YangD245 Member since 2017 31 posts Tata Consultancy Services Posted: 2 years agoLast activity: 2 years 2 months ago Closed Top N records for each group of recordsHow can report definition fetch top N record/s for each group of records? For example, a list report definition fetches below records.SNNameSubjectScore1AMath1002AScience903BMath884BScience99 The requirement is to get only one record for each name that has the highest score and Report Definition result should look like below:SNNameSubjectScore1AMath1004BScience99 Reporting ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Moderation Team has archived post This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question. Posted: 2 years agoVikash Karn PEGA replied to YangD245Hi Yang, You can use custom sql function for your report definition as explained in below link: https://pdn.pega.com/how-create-custom-sql-functions-reporting Regards, Vikash Posted: 2 years agoYangD245 Tata Consultancy Services replied to YangD245Is there any other way of implementing this requirement? Posted: 2 years agoNivethaD Cognizant Technology Solutions India PVT Ltd replied to YangD245Hi Yang, Once the report is generated as in format 1, summarize the report by having a group by for name and max for marks. regards, Nivetha Posted: 2 years agoYangD245 Tata Consultancy Services replied to NivethaDI am still looking for a solution to the question.