A simple selection to GROUP BY a search result

A simple option to be able to GROUP BY the search from the database that can be used in conjunction with SUM, Average etc… just as we have the sort Asc or Desc

I wonder if it corresponds to "Build data aggregations (unique, sum, average, etc)" from the roadmap I really miss this feature too.

I’m not sure, but it has those already you just don’t seem to be able to group by, it is frustrating!

You could get around this in the meantime by utilising another database table that you update accordingly. So, for example if you are creating records where you want to know how many records have the same date then you could create a database table that has the following 3 fields:

  1. Entity type
  2. Date
  3. Count

The entity type allows you to track different types of data. Now, in the flow where you create the new data, you can also create a new entry (or update an existing one).

You can structure this easily with the information you need.

1 Like

Unlike SQL, where you need to to tell it what the relationships are, in Bubble you can let the database do the work.

So if you have have an Invoice table, with Departments for each Invoice. You can have a LIST of Invlices on the Department, and then search for departments and then have a field of Current Cell’s Department’s Invoice Lists’s Amount:sum

And that will do the same thing.

Thanks @NigelG

I think this would work in some instances cases, but isn’t there a limit on list sizes? I seem to recall 10,000 being the number bantered around?

Cheers!

Yes, but I think that once you reached trying to sum multiple instances of 10,000 items “on the fly” you would do it in another way, no matter what your technology.

You would move from a transactional/relational model to something more dimensional for reporting purposes.

Now, I fully accept that getting the data out of bubble is not easy, you can’t point an ETL tool or BI tool at it like you could with mySQL.

However, churning through your “live” database every single time someone asks “I wonder what the sales were for last month” was never a good idea and still isn’t, at scale anyway.

1 Like

Just discovered you can’t have the same number in a list twice :frowning: