Dynamic Sorting of a Data Type that are not directly related

Hello, I recently came across a plugin named “Floppy” and I’m considering its applicability for a specific scenario I’m dealing with. Here’s an outline of my use case:

I’m working with two data types: Brand (A) and Post (B). Each Brand is associated with multiple Posts, but instead of directly linking a list of Posts to a Brand (which is impractical due to the large volume of posts), each Post contains a reference back to its associated Brand.

The fields within each Post include metrics such as views, likes, and shares. My objective is to sort the Brands based on the total views accumulated by their associated Posts. Essentially, I need to aggregate the sum of views from all Posts for each Brand, and then sort the Brands based on these aggregated totals, with the Brand having the highest sum of views ranked at the top.

I’ve read that the Floppy plugin might offer a solution for aggregating and sorting data in this manner, but I’m struggling to understand how to implement this functionality effectively. Can anyone provide insights or guidance on how to leverage Floppy to achieve this sorting based on aggregated post views or is there any other way of doing it in bubble.

@keith the creator of Floppy has quite a few videos on the forum about how to use it: