best approach to get grouped related data from aos_products_quotes

In the quotes edit view, I have a tab that I want to display the records from aos_products_quotes grouped by part number for the currently selected account (I only want to display the most recent record by part number). From the looks of things, the rest api or beans will not allow me to do this. Is an sql call my best option? I guess what it boils down to is what do you do if you need grouped data?