# Help needed Sorting Big Tables through Roll up

**URL:** <https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131>\
**Category:** Ask for Help\
**Created:** [July 12, 2025, 10:10pm UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131 "2025-07-12T22:10:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [July 12, 2025, 10:10pm UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/1 "2025-07-12T22:10:32Z")

</div>

I’m using Big Tables for both Listings and Reviews. I created a rollup column in Listings to calculate the average rating from Reviews. I need to sort listings by this average rating (for a leaderboard), but sorting isn’t supported on computed columns in Big Tables.

If anyone has any loom or template, it would be a great help.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 13, 2025, 12:43am UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/2 "2025-07-13T00:43:35Z")

</div>

I think the most straightforward way for me is every time someone submits a review, you have a relation back to the listings and set the average rating (computed) to a basic column.

---

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [July 13, 2025, 12:47am UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/3 "2025-07-13T00:47:45Z")

</div>

Some reviews could be imported from the backend so this won’t work.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 13, 2025, 2:37am UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/4 "2025-07-13T02:37:37Z")

</div>

How frequently does it have to be imported?

---

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [July 13, 2025, 9:46am UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/5 "2025-07-13T09:46:47Z")

</div>

That I am not sure, but isn’t there any way to make it dynamic?

Art mentioned something about using JSONata for this on Slack. Are you familiar with that approach?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 13, 2025, 11:14pm UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/6 "2025-07-13T23:14:23Z")

</div>

![CleanShot 2025-07-14 at 06.11.17](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/3/93a68c6b70b1b30565921b74917d68c74096751c.png)

There might be something in that approach that I’m not aware of, I tried doing this:

- Join all JSONs in the Reviews table.
- Construct a dynamic query using JSONata.
- Get the average rating through Query JSON.

The average rating column still doesn’t show up in the sort options for my collection.

---

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [July 13, 2025, 11:21pm UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/7 "2025-07-13T23:21:01Z")

</div>

I’m not so familiar with JSONata but could there be a way where we Join all JSONs from the review table in User Profile then get the average rating through some function and return the RowIDs of Listing in an order from highest to lowest, then just make a relation?

Not sure if that’s even possible.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 13, 2025, 11:23pm UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/8 "2025-07-13T23:23:59Z")

</div>

> [@Hassan\_Nadeem](#):
>
> return the RowIDs of Listing in an order from highest to lowest, then just make a relation?

That implies you need to have some sort of a helper table I guess, since an array of rowIDs relating to the Ratings table would just return a list based on the row order of the Ratings table.

---

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [July 13, 2025, 11:26pm UTC](https://community.glideapps.com/t/help-needed-sorting-big-tables-through-roll-up/83131/9 "2025-07-13T23:26:13Z")

</div>

I think the helper table could still work. I can show Top 100 Listings and I can use Glide Tables for the helper table since the entire app is built on Big Tables.

Do you know how this approach would work?
