As MariaDB is a fork of MySQL, I believe it has al the same spatial functionality, which is considerably less than Postgis, but sufficient for your query. You can't GROUP BY a bounding box as such, but you can summarize attributes where the geometries bounding boxes intersect some input geometry. In MySQL/MariaDB, functions that operate on bounding boxes lack the ST_ prefix, see the Contains or Intersects functions. If you want exact spatial containment/intersection, use ST_Contains/ST_Intersects.
So, you could write your query along the lines of:
SET @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
SELECT SUM(some_attribute) FROM some_table WHERE Intersects(geom, @g1)=1;
assuming that your geometry column is called geom.
Note in MySQL you can't use Contains/Intersects on two columns to find all intersections as you can in Postgis, so you would have to run this query for every bounding box geometry you wanted to summarize by. ie, you CAN NOT write:
SELECT attribute from some_table A, some_table B
WHERE ST_Intersects(a.geom, b.geom);
You could write a stored procedure/function in MariaDB that would iterate through each of your bounding boxes providing them to ST_Intersects or Intersects (for MBR) one at a time, but, in my opinion, if you have access to Postgres/Postgis, you will find it much easier to get the output your are looking for.